
Sebastian Redl wrote:
Boris Gubenko wrote:
Again, I'm not sure if a diagnostics is required in this case. See 14.6/5: [...] The implementation is allowed to defer issuing a diagnostic until the function is instantiated.
This is what I suspected, but did not check. Thanks for the reference! Boris ----- Original Message ----- From: "Sebastian Redl" <sebastian.redl@getdesigned.at> To: <boost@lists.boost.org> Sent: Tuesday, October 23, 2007 4:16 PM Subject: Re: [boost] [fusion] Getting rid of the incomplete typeerror forvector
Boris Gubenko wrote:
For the program below, in strict ansi mode, EDG Front End issues an error: "incomplete type is not allowed" (and, accordingly, cxx and aC++ issue this error also). g++ 4.2.1 does not issue any diagnostics, even when compiling '-pedantic -ansi'. Again, I'm not sure if a diagnostics is required in this case.
template <typename T> struct apply { typedef T type; };
template <typename T = void> struct vector;
template <typename Iterator> static typename apply<Iterator>::type call(Iterator) { return vector<>(); }
See 14.6/5:
No diagnostic shall be issued for a tem- plate definition for which a valid specialization can be generated. If no valid specialization can be generated for a template definition, and that template is not instantiated, it is unspecified whether or not an implementation is required to issue a diagnostic. The implementation is allowed to defer issuing a diagnostic until the function is instantiated.
Sebastian Redl _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost