https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70543

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
A slightly reduced version:

#include <type_traits>

template <typename Tuple> struct X
{
  template <unsigned int I = 0> static constexpr
  typename std::enable_if< I == 5, unsigned int>::type
  calc (void)
  {
    return 0;
  }

  template <unsigned int I = 0> static constexpr
  typename std::enable_if< I != 5, unsigned int>::type
  calc (void)
  {
    return 1 + calc<I + 1> ();
  }

  static constexpr unsigned int value = calc ();     // <<<<<<<

  char foo[value];
};


If the marked line is changed to

  static constexpr unsigned int value = calc<0> ();

it compiles fine.

Reply via email to