Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/pr87814.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // { dg-do compile { target c++17 } } | |
2 | |
3 template<class Element> | |
4 struct box { | |
5 template<class E> | |
6 constexpr box(E && e) | |
7 noexcept(noexcept(Element(e))) | |
8 {} | |
9 }; | |
10 | |
11 template<class... Ts> | |
12 struct compressed_tuple_ : box<Ts> ... { | |
13 template<typename... Args> | |
14 constexpr compressed_tuple_(Args &&... args) | |
15 noexcept((noexcept(box<Ts>(args)) && ...)) | |
16 : box<Ts>(args)... | |
17 {} | |
18 }; | |
19 | |
20 struct adaptor_cursor : compressed_tuple_<int*> { | |
21 using compressed_tuple_::compressed_tuple_; | |
22 }; | |
23 | |
24 int main() { | |
25 (void)noexcept(adaptor_cursor{(int*)0}); | |
26 } |