[libcxx-commits] [libcxx] eb252b3 - [libc++] NFC: Port type_info tests to C++03

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 7 10:42:01 PDT 2020


Author: Louis Dionne
Date: 2020-05-07T13:41:51-04:00
New Revision: eb252b328cb645496d9fb1eae85137fa8b60f9da

URL: https://github.com/llvm/llvm-project/commit/eb252b328cb645496d9fb1eae85137fa8b60f9da
DIFF: https://github.com/llvm/llvm-project/commit/eb252b328cb645496d9fb1eae85137fa8b60f9da.diff

LOG: [libc++] NFC: Port type_info tests to C++03

Added: 
    

Modified: 
    libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
    libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
index 5e70be87d31e..a69d53fc9414 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
@@ -26,10 +26,10 @@ void register2();
 
 #if defined(TU1)
   namespace { struct A { bool x; }; }
-  void register1() { registry.emplace_back(std::type_index{typeid(A)}); }
+  void register1() { registry.push_back(std::type_index(typeid(A))); }
 #elif defined(TU2)
   namespace { struct A { int x, y; }; }
-  void register2() { registry.emplace_back(std::type_index{typeid(A)}); }
+  void register2() { registry.push_back(std::type_index(typeid(A))); }
 #elif defined(MAIN)
   std::vector<std::type_index> registry;
 

diff  --git a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
index b9de801e9b49..c7213b7748c8 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
@@ -26,10 +26,10 @@ void register2();
 
 #if defined(TU1)
   namespace { struct A { bool x; }; }
-  void register1() { registry.emplace_back(std::type_index{typeid(A)}); }
+  void register1() { registry.push_back(std::type_index(typeid(A))); }
 #elif defined(TU2)
   namespace { struct A { int x, y; }; }
-  void register2() { registry.emplace_back(std::type_index{typeid(A)}); }
+  void register2() { registry.push_back(std::type_index(typeid(A))); }
 #elif defined(MAIN)
   std::vector<std::type_index> registry;
 


        


More information about the libcxx-commits mailing list