Imported Upstream version 2.99.2
[platform/upstream/libsigc++.git] / tests / test_tuple_cdr.cc
index 12c9650..028a15f 100644 (file)
@@ -66,11 +66,26 @@ test_tuple_cdr_stdref() {
   assert(std::get<1>(t_suffix) == "world");
 }
 
+constexpr
+void
+test_tuple_cdr_constexpr() {
+  constexpr auto str_hello = "hello";
+  constexpr auto str_world = "world";
+
+  constexpr auto t_larger =
+    std::make_tuple(nullptr, str_hello, str_world);
+  constexpr auto t_suffix = sigc::internal::tuple_cdr(t_larger);
+  assert(std::get<0>(t_suffix) == str_hello);
+  assert(std::get<1>(t_suffix) == str_world);
+}
+
 int
 main() {
   test_tuple_type_cdr();
   test_tuple_cdr();
   test_tuple_cdr_stdref();
 
+  test_tuple_cdr_constexpr();
+
   return EXIT_SUCCESS;
 }