aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constexpr-new20.C
blob: 88bc4429a8adb8322151bc61f777d7e2fac9222c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/101663
// { dg-do compile { target c++20 } }

#include "construct_at.h"

template <typename _Tp> struct __box {
  [[no_unique_address]] _Tp _M_value;
};

struct Empty {};

constexpr bool test() {
  __box<Empty> a;
  std::construct_at(&a._M_value);
  return true;
}

static_assert(test());