gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] ACT module; white box testing and aspect templates


From: Eric Hughes
Subject: Re: [Gnash-dev] ACT module; white box testing and aspect templates
Date: Wed, 18 Jul 2007 09:06:08 -0600

Here's the operational reply:

At 08:17 AM 7/18/2007, strk wrote:
cygnal/ACT/Handle.hpp:122: error: invalid default argument for a template template parameter

Null_Aspect_1 should have a namespace qualifier attached to it. Use aspect::Null_Aspect_1.

The fact that this compiles under MSVC is most likely evidence of a compiler defect, either in MSVC or gcc, or else a standards defect. As I recall the code does not instantiate that particular class with its default template; it is instantiated with another class's default aspect (in this case). As a rule, templates delay their instantiation, so it seems arguable that an unknown default argument ought to be legal. On the other hand, a default argument might be argued to be an independent name, which must be legal at the point of definition; this is what gcc seems to be claiming. MSVC, on the other hand, may be read to claim that a default parameter value only comes into scope at the point of instantiation. Stroustrup C.13.8 is the relevant section; I can't find anything definitive in it. I'm not going to bother reading the C++ standard on this.

While interesting, all of the above matters little, because the default template parameter ought to work in other contexts.

Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]