1 // RUN: %clang_cc1 -std=c++2a %s -include %s -verify
2 
3 #ifndef INCLUDED
4 #define INCLUDED
5 
6 #pragma clang system_header
7 namespace std {
8   namespace chrono {
9     struct day{};
10     struct year{};
11   }
12   constexpr chrono::day operator"" d(unsigned long long d) noexcept;
13   constexpr chrono::year operator"" y(unsigned long long y) noexcept;
14 }
15 
16 #else
17 
18 using namespace std;
19 chrono::day dec_d = 5d;
20 chrono::day oct_d = 05d;
21 chrono::day bin_d = 0b011d;
22 // expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}}
23 // expected-note@9{{candidate constructor (the implicit copy constructor)}}
24 // expected-note@9{{candidate constructor (the implicit move constructor)}}
25 chrono::day hex_d = 0x44d;
26 chrono::year y  = 10y;
27 #endif
28