C++ Logo


Advanced search

Re: enum class value name string via something similar to typeid().name() ?

From: Sebastian BŁttner <sebastian.buettner_at_[hidden]>
Date: Sat, 09 Nov 2019 20:57:52 +0000
I aggree on both your statements.

However I still think that the problem is just one of many in that domain.
With reflection at hand we will be able to solve this and even way more like
enumerating class members and so on.

WG21 still has no common direction on this, however significant work has
already been done. It is still a long way to go tho. There is at least one
major proposal on this in flight (with some serious opposition to it).

You might want to have a look at P1240 (Scalable Reflection in C++, http://

The first example on page 2 is already what you are looking for (kinda at


On Samstag, 9. November 2019 19:40:41 UTC Jonny Grant wrote:

> Seems a shame if we need to write a python script to generate the
> to_string_str for each enum.
> Don't you just hate it when you get a debug log that shows :-

Received on 2019-11-09 15:00:14