Define COMPILE_IF_MUTABLE

Define Documentation

COMPILE_IF_MUTABLE(QUERY_TYPE, RETURN_TYPE)

A help macro to simplify conditional compilation based on mutability.

Copyright

Copyright 2021 Apex.AI, Inc. All rights reserved.

        This macro just wraps the SFINAE paradigm and enables compilation only if the
        QUERY_TYPE is mutable. This macro is replaced by RETURN_TYPE in this case. If
        QUERY_TYPE is const, the code following this macro invocation will not be compiled.

Parameters:
  • QUERY_TYPE – The query type to be checked for mutability.

  • RETURN_TYPE – The return type generated if compilation succeeds.