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

--- Comment #1 from Andreas Hangauer <ahangauer at gmx dot net> ---
I just found out that using nullptr it *does* work. So it is the initialization
by integer zero that does not work.

#include <cstddef>

template <class X, bool (X::*fcn)(int param)=0 >
struct test   {
        int v;
};

struct dummy {
        bool fcn(int);
};

using TT = test<dummy, &dummy::fcn>;    // works
using TT2 = test<dummy, nullptr>;       // works
using TT3 = test<dummy, 0>;             // generates ICE
using TT4 = test<dummy>;                // generates ICE

Reply via email to