http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60852

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
reduced test case:

struct A;
typedef A false_;
struct A
{
};
template <int> struct B;
template <> struct B<false> : false_
{
};
template <int> struct C
{
  static const int value = 0;
};
template <typename T> T &make ();
struct D
{
  template <class T> D (T);
};
template <typename, typename, int> struct G;
template <typename Rhs> struct H
{
  static const int value = G<Rhs, int, 0>::value;
};
template <typename Rhs> struct I : B<H<Rhs>::value>
{
};
enum class E;
int operator~(const D &);
template <typename Rhs> struct F
{
  static const int value = sizeof ~make<Rhs>();
};
template <typename Rhs, typename Ret> struct G<Rhs, Ret, 0>
{
  static const int value = C<F<Rhs>::value>::value;
};
int main () { I<E>(); }

markus@x4 tmp % g++ -std=c++11 boost.ii
boost.ii: In instantiation of ‘const int F<E>::value’:
boost.ii:35:20:   required from ‘const int G<E, int, 0>::value’
boost.ii:22:20:   required from ‘const int H<E>::value’
boost.ii:24:32:   required from ‘struct I<E>’
boost.ii:37:20:   required from here
boost.ii:31:35: error: no match for ‘operator~’ (operand type is ‘E’)
   static const int value = sizeof ~make<Rhs>();
                                   ^

Reply via email to