Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/noexcept35.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++11 } } | |
2 | |
3 template <typename _Tp, _Tp __v> struct A { static constexpr _Tp value = __v; }; | |
4 typedef A<bool, false> false_type; | |
5 struct is_same : false_type {}; | |
6 template <bool> struct enable_if; | |
7 template <typename> using __remove_cvref_t = int; | |
8 template <typename _Tp> class reference_wrapper { | |
9 static _Tp _S_fun(); | |
10 template <typename _Up, typename = __remove_cvref_t<_Up>> | |
11 using __not_same = enable_if<is_same::value>; | |
12 | |
13 public: | |
14 template <typename _Up, typename = __not_same<_Up>> | |
15 reference_wrapper(_Up) noexcept(noexcept(reference_wrapper::_S_fun)); | |
16 }; | |
17 | |
18 reference_wrapper<int> fn1() { | |
19 int __t = 10; | |
20 return __t; | |
21 } |