Return InvokeResult_VoidChecker() if the left argument is of type cv‐`void`; otherwise bslmf::Tag<false>(). This overload of the comma operator is declared but not defined, and is intended to be used in metafunctions in an unevaluated context to detect void expressions. For any non‐void expression expr, (expr,InvokeResult_VoidChecker()), will match this overload and produce a result of type bslmf::Tag<false>. However, const t_TYPE& will not match void, so if expr is a void expression, the built‐in comma operator is matched and the result will have type InvokeResult_VoidChecker (i.e., the second argument).
Synopsis
Declared in <bslmf_invokeresult.h>
template<class t_TYPE>
Tag<false>
operator,(
t_TYPE const&,
InvokeResult_VoidChecker)
requires !bsl::is_void<t_TYPE>::value;
Description
Note that Sun CC incorrectly matches this overload for a void expression, then fails hard. The enable_if prevents this match for Sun CC and any other compilers that may similarly match void and is harmless for compilers that don't.
Created with MrDocs