• Harris Hancock's avatar
    Use IIFE instead of GNU statement expression · e780e3ed
    Harris Hancock authored
    An immediately-invoked function expression with a default reference
    capture list should be roughly equivalent to a GNU compound statement
    expression. I'm unsure whether or not the result should be returned by
    kj::mv() -- I would expect the compiler to optimize appropriately, but
    have not tested this.
    
    Note: There are two versions of KJ_REQUIRE_NONNULL in kj/debug.h: one that
    works with MSVC's preprocessor, and one which works with the standard-
    compliant preprocessor. This commit only touches the MSVC version of the
    macro, because that is the minimum necessary work to get it to compile in
    MSVC. However, it may make sense to convert the other one to use IIFE as
    well.
    e780e3ed
debug.h 19.4 KB