]> gcc.gnu.org Git - gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/any/cons/in_place.cc
Implement LWG 2744 and LWG 2754.
[gcc.git] / libstdc++-v3 / testsuite / 20_util / any / cons / in_place.cc
index 2368b83d250a3aaad027913118a115a516811ca8..52f2b38d5fc1bb3f62019e7b6a2cc260af922e2c 100644 (file)
@@ -54,4 +54,12 @@ int main()
   combined& c2 = std::any_cast<combined&>(o5);
   VERIFY(c2.v[0] == 1 && c2.v[1] == 2
         && std::get<0>(c2.t) == 3 && std::get<1>(c2.t) == 4 );
+  std::any o6(std::in_place<int&>, i);
+  VERIFY(o6.type() == o.type());
+  std::any o7(std::in_place<void()>, nullptr);
+  std::any o8(std::in_place<void(*)()>, nullptr);
+  VERIFY(o7.type() == o8.type());
+  std::any o9(std::in_place<char(&)[42]>, nullptr);
+  std::any o10(std::in_place<char*>, nullptr);
+  VERIFY(o9.type() == o10.type());
 }
This page took 0.028174 seconds and 5 git commands to generate.