#if __has_include() #include namespace std { namespace pmr = experimental::pmr; } #elif __has_include() #include #elif #error is missing #endif #include struct MyStruct { template using ParallelFlatHashMap = phmap::parallel_flat_hash_map, std::equal_to, std::pmr::polymorphic_allocator>>; ParallelFlatHashMap hashMap; // No compile errors MyStruct() { } // Compile errors MyStruct(std::pmr::memory_resource* memoryResource = std::pmr::get_default_resource()) : hashMap(memoryResource) { } };