Re: multimap and abstract class
On Aug 20, 1:12 pm, Sam <s...@email-scan.com> wrote:
Barry writes:
[...]
I don't understand why I get this fail since I haven't even
created a EventList object yet.
Because the compiler evaluates the template definition, and
finds out that some of the template functions end up
instantiating an abstract class, which, of course, is an
error.
If that were the case, it would be an error in the compiler.
The compiler is not allowed to instantiate any functions in the
context he uses the class, and may not reject the instantiation
on the basis of what some function may or may not use.
More likely, the library has implemented some form of
constraints checking, and is using that. The standard says that
the code is undefined behavior---with a na=EFve implementation, it
will likely pass until some function is instantiated, but an
implemenation may use concepts to catch the error earlier.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34