Debian Codegraph @

libstdc++-v3/testsuite/20_util/is_convertible/requirements/access.cc

raw
1 // { dg-do compile { target c++11 } }
2 // PR c++/107049
3
4 #include <type_traits>
5
6 class Private
7 {
8 operator int() const
9 {
10 static_assert( not std::is_convertible<Private, int>::value, "" );
11 #if __cpp_lib_type_trait_variable_templates
12 static_assert( not std::is_convertible_v<Private, int>, "" );
13 #endif
14 return 0;
15 }
16 };
17
18 static_assert( not std::is_convertible<Private, int>::value, "" );