This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.

### 2868. Missing specification of `bad_any_cast::what()`

Section: 20.8.3 [any.bad.any.cast] Status: C++17 Submitter: Great Britain Opened: 2017-02-03 Last modified: 2021-06-06

Priority: Not Prioritized

View all issues with C++17 status.

Discussion:

Addresses GB 54

There is no specification for `bad_any_cast.what`.

Proposed change:

Add a paragraphs:

>     const char* what() const noexcept override;

> > Returns: An implementation-defined NTBS.

> > Remarks: The message may be a null-terminated multibyte string (17.5.2.1.4.2), suitable for conversion and display as a `wstring` (21.3, 22.4.1.4).

[Kona 2017-03-01]

Accepted as Immediate to resolve NB comment.

Proposed resolution:

This wording is relative to N4618.

1. Insert the following series of paragraphs to [any.bad_any_cast] as indicated:

   >     const char* what() const noexcept override;

   > > -?- Returns: An implementation-defined NTBS.

   > > -?- Remarks: The message may be a null-terminated multibyte string (16.3.3.3.5.3 [multibyte.strings]), suitable for conversion and display as a `wstring` (21.3 [string.classes], 28.4.2.5 [locale.codecvt]).