This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::rethrow_exception is broken


On 27/03/14 22:22 +0100, François Dumont wrote:
Shouldn't static assertion messages say that layout is incorrect ? It is strange to have compilation error with a message saying that it is correct, isn't it ?

The assertion is that the layout is correct, and if that's not true
the message says "static assertion failed: layout is correct".

The error message would say that the assertion "layout is correct"
failed, where that string is an English description of the condition
being asserted.

If you compare it to a traditional assert() then you get "assertion
'xxx' failed" where xxx is the condition being tested.

But as far as I know the C++ community hasn't decided yet whether it's
better to use the string to describe the condition that failed, or
give a meaningful diagnostic.

I could reword it to avoid the word correct, I suppose.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]