SFINAE enable_if type alias for types convertible to string_view but not C‐string.

Synopsis

Declared in <bslstl_stringviewlikeparam.h>

#define BSLSTL_STRINGVIEWLIKEPARAM_ONLY_ENABLE_IF_T(…​)

Description

Expand to an enable_if type alias for ResultType that is defined (i.e., SFINAE‐friendly) only when the STRING_VIEW_LIKE_TYPE template parameter is convertible to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> but is not convertible to const CHAR_TYPE *. The CHAR_TYPE and CHAR_TRAITS template parameters must be in scope. The specified ResultType (passed as a variadic argument) is the resulting type when both conditions are satisfied.

Created with MrDocs