The following code compiles fine under clang and gcc but fails for icc (v14.0.2):
namespace traits_tests { template<typename> struct sfinae_true : true_type {}; template<typename T> static auto value_type(int) -> sfinae_true<typename T::value_type>; template<typename T> static auto value_type(void*) -> false_type; } template<typename C> struct has_value_type : decltype(traits_tests::value_type<C>(0)) {};
with the error message
inc/traits.h(258): error: expected an identifier
: decltype(traits_tests::value_type<C>(0)) {};
^
.