// PR c++/107049 // { dg-do compile { target c++11 } } // Failed access check should be a substitution failure, not an error. template struct bool_constant { static constexpr bool value = B; }; template struct is_convertible : public bool_constant<__is_convertible(From, To)> { }; #if __cpp_variable_templates template constexpr bool is_convertible_v = __is_convertible(From, To); #endif class Private { operator int() const { static_assert( not is_convertible::value, "" ); #if __cpp_variable_templates static_assert( not is_convertible_v, "" ); #endif return 0; } }; static_assert( not is_convertible::value, "" ); #if __cpp_variable_templates static_assert( not is_convertible_v, "" ); #endif