|
1 | 1 | In file included from pure2-default-arguments.cpp:7:
|
2 | 2 | ../../../include/cpp2util.h:2086:28: error: local variable ‘obj’ may not appear in this context
|
3 |
| - 2086 | auto as( std::variant<Ts...> & x ) -> decltype(auto) { |
| 3 | + 2086 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 9>(x)), T >) { if (x.index() == 9) return operator_as<9>(x); } |
4 | 4 | | ^~~
|
5 | 5 | ../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’
|
6 |
| - 2047 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<15>(x)), T >) { if (x.index() == 15) return true; } |
7 |
| - | ^~~~~~~~~~~ |
| 6 | + 2047 | return false; |
| 7 | + | ^ |
8 | 8 | ../../../include/cpp2util.h:2086:15: note: in expansion of macro ‘CPP2_FORWARD’
|
9 |
| - 2086 | auto as( std::variant<Ts...> & x ) -> decltype(auto) { |
| 9 | + 2086 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 9>(x)), T >) { if (x.index() == 9) return operator_as<9>(x); } |
10 | 10 | | ^~~~~~~~~~~~
|
11 | 11 | ../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’
|
12 |
| - 2107 | Throw( std::bad_variant_access(), "'as' cast failed for 'variant'"); |
| 12 | + 2107 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 5>(x)), T >) { if (x.index() == 5) return operator_as<5>(x); } |
13 | 13 | | ^~~~~~~~~~~~~~~~~~~~~~~~
|
14 | 14 | ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
|
15 |
| - 2137 | // std::any is and as |
| 15 | + 2137 | template<typename T, typename X> |
16 | 16 | | ^
|
17 | 17 | pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
|
18 | 18 | ../../../include/cpp2util.h:2086:92: error: local variable ‘params’ may not appear in this context
|
19 |
| - 2086 | auto as( std::variant<Ts...> & x ) -> decltype(auto) { |
20 |
| - | ^ |
| 19 | + 2086 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 9>(x)), T >) { if (x.index() == 9) return operator_as<9>(x); } |
| 20 | + | ^~~~~~ |
21 | 21 | ../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’
|
22 |
| - 2047 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<15>(x)), T >) { if (x.index() == 15) return true; } |
23 |
| - | ^~~~~~~~~~~ |
| 22 | + 2047 | return false; |
| 23 | + | ^ |
24 | 24 | ../../../include/cpp2util.h:2086:79: note: in expansion of macro ‘CPP2_FORWARD’
|
25 |
| - 2086 | auto as( std::variant<Ts...> & x ) -> decltype(auto) { |
26 |
| - | ^ |
| 25 | + 2086 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 9>(x)), T >) { if (x.index() == 9) return operator_as<9>(x); } |
| 26 | + | ^~~~~~~~~~~~ |
27 | 27 | ../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’
|
28 |
| - 2107 | Throw( std::bad_variant_access(), "'as' cast failed for 'variant'"); |
| 28 | + 2107 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 5>(x)), T >) { if (x.index() == 5) return operator_as<5>(x); } |
29 | 29 | | ^~~~~~~~~~~~~~~~~~~~~~~~
|
30 | 30 | ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
|
31 |
| - 2137 | // std::any is and as |
| 31 | + 2137 | template<typename T, typename X> |
32 | 32 | | ^
|
33 | 33 | pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
|
34 | 34 | ../../../include/cpp2util.h:2087:74: error: local variable ‘obj’ may not appear in this context
|
35 |
| - 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 0>(x)), T >) { if (x.index() == 0) return operator_as<0>(x); } |
| 35 | + 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<10>(x)), T >) { if (x.index() == 10) return operator_as<10>(x); } |
36 | 36 | | ^~~
|
37 | 37 | ../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’
|
38 |
| - 2047 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<15>(x)), T >) { if (x.index() == 15) return true; } |
39 |
| - | ^~~~~~~~~~~ |
| 38 | + 2047 | return false; |
| 39 | + | ^ |
40 | 40 | ../../../include/cpp2util.h:2087:61: note: in expansion of macro ‘CPP2_FORWARD’
|
41 |
| - 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 0>(x)), T >) { if (x.index() == 0) return operator_as<0>(x); } |
| 41 | + 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<10>(x)), T >) { if (x.index() == 10) return operator_as<10>(x); } |
42 | 42 | | ^~~~~~~~~~~~
|
43 | 43 | ../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’
|
44 |
| - 2107 | Throw( std::bad_variant_access(), "'as' cast failed for 'variant'"); |
| 44 | + 2107 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 5>(x)), T >) { if (x.index() == 5) return operator_as<5>(x); } |
45 | 45 | | ^~~~~~~~~~~~~~~~~~~~~~~~
|
46 | 46 | ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
|
47 |
| - 2137 | // std::any is and as |
| 47 | + 2137 | template<typename T, typename X> |
48 | 48 | | ^
|
49 | 49 | pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
|
50 | 50 | ../../../include/cpp2util.h:2087:93: error: local variable ‘params’ may not appear in this context
|
51 |
| - 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 0>(x)), T >) { if (x.index() == 0) return operator_as<0>(x); } |
| 51 | + 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<10>(x)), T >) { if (x.index() == 10) return operator_as<10>(x); } |
52 | 52 | | ^~~~~~
|
53 | 53 | ../../../include/cpp2util.h:2047:34: note: in definition of macro ‘CPP2_UFCS_IDENTITY’
|
54 |
| - 2047 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<15>(x)), T >) { if (x.index() == 15) return true; } |
55 |
| - | ^~~~~~~~~~~ |
| 54 | + 2047 | return false; |
| 55 | + | ^ |
56 | 56 | ../../../include/cpp2util.h:2087:80: note: in expansion of macro ‘CPP2_FORWARD’
|
57 |
| - 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 0>(x)), T >) { if (x.index() == 0) return operator_as<0>(x); } |
| 57 | + 2087 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as<10>(x)), T >) { if (x.index() == 10) return operator_as<10>(x); } |
58 | 58 | | ^~~~~~~~~~~~
|
59 | 59 | ../../../include/cpp2util.h:2107:22: note: in expansion of macro ‘CPP2_UFCS_CONSTRAINT_ARG’
|
60 |
| - 2107 | Throw( std::bad_variant_access(), "'as' cast failed for 'variant'"); |
| 60 | + 2107 | if constexpr (std::is_same_v< CPP2_TYPEOF(operator_as< 5>(x)), T >) { if (x.index() == 5) return operator_as<5>(x); } |
61 | 61 | | ^~~~~~~~~~~~~~~~~~~~~~~~
|
62 | 62 | ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
|
63 |
| - 2137 | // std::any is and as |
| 63 | + 2137 | template<typename T, typename X> |
64 | 64 | | ^
|
65 | 65 | pure2-default-arguments.cpp2:6:22: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
|
66 | 66 | pure2-default-arguments.cpp2:6:61: error: ‘std::source_location’ has not been declared
|
0 commit comments