view gcc/testsuite/g++.dg/template/array11.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

// { dg-do compile }
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
// PR c++/19208: Fold dependent array domains

template <class C> struct if_t { typedef int type; };
template <class T> struct ffff { static const bool value = true; };
template <class A>
struct bound_member_action
{
  typedef char f[ffff<A>::value ? 1 : 2];
  template <class CT>
    bound_member_action(CT i, typename if_t<f>::type g)  {}
};
bound_member_action<int> a(0, 1);