File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
std/containers/associative/map/map.access Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ TEST_CONSTEXPR_CXX26 bool test() {
5353 assert (m[6 ] == 6.5 );
5454 assert (m.size () == 2 );
5555 }
56- #ifndef FAKE_MACRO_NOOOOOO
57- if (! TEST_IS_CONSTANT_EVALUATED)
56+ // #ifndef FAKE_MACRO_NOOOOOO
57+ # ifndef TEST_IS_CONSTANT_EVALUATED
5858{
5959 // Use "container_test_types.h" to check what arguments get passed
6060 // to the allocator for operator[]
Original file line number Diff line number Diff line change @@ -317,27 +317,19 @@ class ContainerTestAllocator
317317
318318 template <class Up , class ...Args>
319319 void construct (Up* p, Args&&... args) {
320- #if TEST_STD_VER >= 26
321- if (TEST_IS_CONSTANT_EVALUATED) {
322-
323- // TODO: This restriction relies on UB where std::__tree_node is not initialized
320+ // FIXME: This test relies on UB where std::__tree_node is not initialized
324321 // and only the "Container::value_type" is initialized
325322 // Need to figure out the right way to solve this without breaking both conditions
326- // 1 of 2) Initializating tree_node in the __tree codebase
323+ // 1 of 2) Initializating tree_node in the __tree codebase (at constexpr time)
327324 // 2 of 2) Ensuring construct is only instantatiated for value_type
328325
329- // static_assert((std::is_same<Up, AllowConstructT>::value),
330- // "Only allowed to construct Up");
326+ // as the test in map/map.access/index_rv_key.pass.cpp (and others)
327+ // rely on a static object (so can't be used at constpex time)
328+ // so it is avoided at this moment
331329
332- } else {
333- #else
334330 static_assert ((std::is_same<Up, AllowConstructT>::value),
335331 " Only allowed to construct Up" );
336- #endif
337332
338- #if TEST_STD_VER >= 26
339- }
340- #endif
341333
342334 assert (controller->check <Args&&...>());
343335 {
You can’t perform that action at this time.
0 commit comments