]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp
Vendor import of libc++ trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / std / experimental / utilities / propagate_const / propagate_const.class / propagate_const.ctors / convertible_element_type.non-explicit.ctor.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // UNSUPPORTED: c++98, c++03, c++11
11
12 // <propagate_const>
13
14 // template <class U> constexpr propagate_const(propagate_const<_Up>&& pu);
15
16 #include <experimental/propagate_const>
17 #include "propagate_const_helpers.h"
18 #include <cassert>
19
20 using std::experimental::propagate_const;
21
22 typedef propagate_const<CopyConstructibleFromX> P;
23
24 void f(const P& p)
25 {
26   assert(*p==2);
27 }
28
29 int main() {
30   f(X(2));
31 }
32