On 2012-03-20 07:22, Akira Takahashi wrote:
> I found missing description. N3337 19.5.1.1 error_category:
> virtual ~error_category() noexcept;
>
> This function is nothing description.
I agree, because a virtual destructor is not covered by the general
statement in [functions.within.classes] p1.
> Correct code is follow?
> virtual ~error_category() noexcept = default;
Except for the explicit noexcept specification, yes. There is a general
normative statement in [res.on.exception.handling] p4
"Every destructor in the C++ standard library shall behave as if it had
a non-throwing exception specification."
which rules this already. This is the reason why *no* destructor
declaration in the library specification does have any noexcept
specification. Adding this suddenly at one place would make give the
impression that we have a special case here.
HTH& Greetings from Bremen,
Daniel Krügler