view gcc/testsuite/g++.dg/cpp1z/pr81349.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

// PR c++/81349
// { dg-do compile { target c++17_only } }

#include <type_traits>

struct A {
  A (int) = delete;
};

struct B {
  template <typename T>
  B (T) = delete;
};

template <typename U>
struct C {
  C (U) = delete;
};

template <typename U>
struct D {
  template <typename T>
  D (T, U) = delete;
};

static_assert (std::is_aggregate_v<A>);
static_assert (std::is_aggregate_v<B>);
static_assert (std::is_aggregate_v<C<int>>);
static_assert (std::is_aggregate_v<D<int>>);