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 5e70be87d31e6..a69d53fc94146 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 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 b9de801e9b49f..c7213b7748c82 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 registry;