Allow to generate associated constants in the body of C++ structs.
Opt-in since it uses a C++17 feature, but this allow exactly the same usage in C++ and Rust, which I think is nice. This also fixes constants of transparent structs in general, since the initial version of this patch broke a test (associated constants in enums), so I added a test for that too.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
using Transparent = uint8_t;
|
||||
|
||||
static const Transparent FOO = 0;
|
||||
Reference in New Issue
Block a user