view gcc/testsuite/g++.dg/cpp2a/nontype-class24.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// PR c++/92150
// { dg-do compile { target c++2a } }

struct X {
  int value;
  // auto operator==(const X&) = default;
};

template<typename T, X N>
struct b;

template<typename T>
inline constexpr bool is_b = false;

template<typename T, X N>
inline constexpr bool is_b<b<T, N>> = true;

using my_b = b<int, X{1}>;
static_assert(is_b<my_b>);