Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/diagnostic/pr65923.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 // { dg-do compile { target c++14 } } |
2 | |
3 #include <chrono> | |
4 | |
5 using std::literals::chrono_literals::operator""s; | |
6 | |
7 struct X | |
8 { | |
9 friend constexpr std::chrono::duration<long double> std::literals::chrono_literals::operator""s(long double); | |
10 }; | |
11 | |
12 struct X2 | |
13 { | |
14 friend constexpr X operator""foo(long double) {return {};} // { dg-warning "literal operator suffixes not preceded" } | |
15 }; | |
16 | |
17 namespace std | |
18 { | |
19 template<> void swap(X&, X&) | |
20 { | |
21 constexpr std::chrono::duration<long double> operator""s(long double); | |
22 } | |
23 } |