This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Invalid concept-checking code in V3
- To: libstdc++ at gcc dot gnu dot org
- Subject: Invalid concept-checking code in V3
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 12 Jul 2001 15:10:37 -0700
The concept-checking code in V3 is invalid due to its use of this
pattern:
template <typename T>
class C {
__glibcpp_class_requires (T, SomeConcept);
};
Here __glibcpp_class_requires is a macro that sometimes expands to
the empty string. Then, you end up with:
template <typename T>
class C {
;
};
That's not valid; a member-declaration cannot consist of a single
`;'. (I found this because the new parser did. It's amzaing what
actually reading the spec as you implement code will do for you.)
The cleanest solution is probably to move the `;' into the
definition of the macro.
I'll file a PR as well.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com