Skip to content

Commit

Permalink
[libc++] NFC: Port type_info tests to C++03
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed May 7, 2020
1 parent 9f88912 commit eb252b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -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;

Expand Down
Expand Up @@ -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;

Expand Down

0 comments on commit eb252b3

Please sign in to comment.