gcc/testsuite/g++.dg/lookup/two-stage3.C
raw| 1 | // { dg-do compile } |
| 2 | // PR c++/2922 |
| 3 | |
| 4 | namespace tpl_ { |
| 5 | |
| 6 | template<class T> |
| 7 | char test(T); |
| 8 | |
| 9 | template<class T> |
| 10 | struct check |
| 11 | { |
| 12 | static T const t; |
| 13 | enum { value = 1 == sizeof(test(t)) }; |
| 14 | }; |
| 15 | |
| 16 | double test(int); |
| 17 | |
| 18 | } |
| 19 | |
| 20 | bool const two_phase_lookup_supported = tpl_::check<int>::value; |
| 21 | |
| 22 | int compile_time_assert[two_phase_lookup_supported ? 1 : -1]; |