summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-sizeof2.C
blob: 8676ae40b61b6beb6d193f8d0bef0f1576a5ccb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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()];
}