
On May 28, 2005, at 6:37 AM, John Maddock wrote:
I am getting the error from Intel C++ at the point of declaration of the compressed_pair specialization.
I've experimented some more, and found one bug in the current implementation:
If one of the templates arguments is both const and an empty class, then compressed_pair attempts to inherit from the const-class type which generates an error for Intel C++, but not strangely for VC++.
Interesting. I'm not seeing that problem here (on CW) either.
BTW, at the risk of stating the obvious, compiler error messages really help when reporting issues (JM runs and ducks for cover!).
Umm... yeah! And what was the error on Intel with the const empty type? ;-) This is a pretty interesting point. I whipped this test up to explore: struct Base {}; typedef const Base ConstBase; struct A : ConstBase { A() {} }; It compiles on CW. But it doesn't on Comeau C++ Online (thanks Greg). Normally when CW and EDG disagree, the decision usually goes to EDG. So I started searching the standard for where it says that cv-qualified classes can't be used as base specifiers so that I could send our compiler team the bug report. Couldn't find it. So I started digging into the core issues list and found: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#484 Subject: Can a base-specifier name a cv-qualified class type? Ah, perfect.
The resolution of issue 298 added new text to 9.1 class.name paragraph 5 making it clear that a typedef that names a cv-qualified class type is a class-name. Because the definition of base-specifier simply refers to class-name, it is already the case that cv-qualified class types are permitted as base-specifiers.
No kidding. And check out the date on that:
Rationale (April, 2005):
Fresh from the Lillehammer presses! :-) -Howard