view gcc/testsuite/g++.dg/cpp0x/constexpr-sizeof2.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++/90825 - endless recursion when evaluating sizeof.
// { dg-do compile { target c++11 } }

class address {
  char host_[63];
public:
  static constexpr unsigned buffer_size() noexcept { return sizeof(host_); }
};

template <class Archive>
void load()
{
  char host[address::buffer_size()];
}