We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I downloaded build 200 and tried to compile https://github.com/seanbaxter/circle/blob/master/reflection/one.cxx but I got this error:
code:
#include <cstdio> #include <string> struct record_t { std::string first; std::string last; char32_t middle_initial; int year_of_birth; }; template<typename type_t> void print_members() { printf("%s:\n", @type_string(type_t)); @meta for(int i = 0; i < @member_count(type_t); ++i) { printf("%d: %s - %s\n", i, @member_type_string(type_t, i), @member_name(type_t, i)); } } int main() { print_members<record_t>(); }
output:
ODR used by: int main() one.cxx:21:26 print_members<record_t>(); ^ error: command line macros:2:1 object has invalid storage duration ^
I played it a little more by deleting random code and found that if I delete @meta then the following code can compile:
@meta
for(int i = 0; i < @member_count(type_t); ++i) { printf("%d: %s - %s\n", i, @member_type_string(type_t, i), @member_name(type_t, i)); }
but the output is incorrect:
record_t: 0: std::string - first 1: std::string - first 2: std::string - first 3: std::string - first
The text was updated successfully, but these errors were encountered:
I'm not sure if it's related circle classic and new circle as mentioned at https://github.com/seanbaxter/circle/blob/master/new-circle/README.md#meta
circle classic
new circle
Sorry, something went wrong.
No branches or pull requests
Hi,
I downloaded build 200 and tried to compile https://github.com/seanbaxter/circle/blob/master/reflection/one.cxx but I got this error:
code:
output:
I played it a little more by deleting random code and found that if I delete
@meta
then the following code can compile:but the output is incorrect:
The text was updated successfully, but these errors were encountered: