Message ID | 51B5FA49.4030705@oracle.com |
---|---|
State | New |
Headers | show |
Index: g++.dg/cpp0x/pr52440.C =================================================================== --- g++.dg/cpp0x/pr52440.C (revision 0) +++ g++.dg/cpp0x/pr52440.C (working copy) @@ -0,0 +1,27 @@ +// PR c++/52440 +// { dg-do compile { target c++11 } } + +template<bool> +struct V +{ + typedef void type; +}; + +template<typename T> +struct X +{ + template<typename> + static constexpr bool always_true() + { + return true; + } + + template<typename U, + typename = typename V<always_true<U>()>::type> + X(U &&) {} +}; + +int main() +{ + X<int> x(42); +}