Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/diagnostic/pr65923.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
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 } |