Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae-neg.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do compile { target c++14 } } // { dg-prune-output "note:" } template<bool, typename _Tp = void>struct enable_if {}; template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; }; template<typename CharT, CharT... String> typename enable_if<sizeof...(String) == 1, int>::type operator"" _script () { // { dg-error "no type named|in" } return 1; } template<typename CharT, CharT... String> typename enable_if<sizeof...(String) == 2, int>::type operator"" _script () { // { dg-error "no type named|in" } return 2; } int a = "1"_script; int b = "22"_script; int c = "333"_script; // { dg-error "no matching function for call to"}