Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
neargye
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
Show HN: Enum to_string, from_string, iterating for modern C++, without macro
(github.com)
2 points
by
neargye
7y ago
|
0 comments
2.
▲
Static reflection for enums (to string, from string, iteration) for modern C++
(github.com)
4 points
by
neargye
7y ago
|
0 comments
3.
▲
Show HN: Static reflection on enums for modern C++
(github.com)
3 points
by
neargye
7y ago
|
0 comments
4.
▲
by
neargye
8y ago
New version supported GCC >= 9
5.
▲
by
neargye
8y ago
yeap, I use __PRETTY_FUNCTION__.
6.
▲
by
neargye
8y ago
To be sure: nameof(c) returns "c" (nameof return name of variable) nameof_enum(c) returns "RED" (nameof_enum return enum name of enum variable)
7.
▲
by
neargye
8y ago
You are absolutely right :)
8.
▲
by
neargye
8y ago
With features C++17 this header looks not so terribly.
9.
▲
by
neargye
8y ago
I usually check the newest versions of compilers, and if the behavior changes, then I update the code
10.
▲
by
neargye
8y ago
https://stackoverflow.com/a/31163837/9514814
11.
▲
by
neargye
8y ago
In fact, not so much about the whole big project. May add a few seconds to the compilation.
12.
▲
by
neargye
8y ago
In our project, NAMEOF_TYPE and NAMEOF almost do not add time relative to the entire project. But NAMEOF_ENUM can add a couple of seconds to large enums.
13.
▲
by
neargye
8y ago
Unfortunately, yes, I'm still looking for a solution for gcc
14.
▲
Show HN: Nameof Operator for Modern C++
(github.com)
65 points
by
neargye
8y ago
|
23 comments
15.
▲
by
neargye
8y ago
Header-only C++17 library provides nameof macros and functions to obtain simple name of variable, type, function, macro, and enum. Before, you had to use string literals to refer to definitions, which is brittle when renaming code elements
16.
▲
Nameof Operator for Modern C++
(github.com)
2 points
by
neargye
8y ago
|
1 comments