view gcc/testsuite/g++.dg/cpp0x/initlist120.C @ 152:2b5abeee2509

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

// PR c++/93559 - ICE with CONSTRUCTOR flags verification.
// { dg-do compile { target c++11 } }

struct F { int d[10]; };
struct E { F f; };

struct S {
  constexpr int operator()(char) { return 42; }
};

template <typename> struct X {
  constexpr static E foo(S s) { return {{{s(1)}}}; }
};

S s;
static_assert((X<S>::foo(s), 1), "");