This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
static_assert(sizeof(g<C>(0)) == 2, "Ouch"); // line 11
typedef int testg[sizeof(g<C>(0)) == 2 ? 1 : -1]; // line 13
what happens is that line 13 is mishandled:
sfinae37_red.C:13:48: error: size of array Âtestg is negative
However, *if I comment out line 11*, things work for line 13! If I swap line 11 and line 13 then the declaration of testg is accepted and the static_assert triggers.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |