view gcc/testsuite/g++.dg/cpp1y/constexpr-71537.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/71537
// { dg-do compile { target c++14 } }

constexpr bool
foo ()
{
  constexpr int n[42] = { 1 };
  constexpr int o = n ? 1 : 0;
  constexpr int p = n + 1 ? 1 : 0;
  constexpr int q = "abc" + 1 ? 1 : 0;
  return o + p + q == 3;
}

static_assert (foo (), "");