summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/polymorphic_allocator/lwg3683.cc
blob: acc91f540b5ebd49bd633727137d4e632b3b58db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do compile { target c++17 } }

#include <memory_resource>

bool
test_lwg3683(const std::pmr::polymorphic_allocator<int>& a)
{
  if (a == std::pmr::get_default_resource())
    return true;
  if (std::pmr::get_default_resource() != a)
    return false;
  throw a;
}