Skip to content
New issue

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

add filed name #293

Merged
merged 2 commits into from
Jul 9, 2024
Merged

add filed name #293

merged 2 commits into from
Jul 9, 2024

Conversation

qicosmos
Copy link
Owner

@qicosmos qicosmos commented Jul 8, 2024

add field_name:

struct sub {
  int id;
};

struct person {
  ns::ns2::Color color;
  int id;
  sub s;
  std::string str;
};

TEST_CASE("test field string") {
  constexpr auto field_name1 = iguana::field_string<&person::color>();
  constexpr auto field_name2 = iguana::field_string<&person::id>();
  constexpr auto field_name3 = iguana::field_string<&person::s>();
  constexpr auto field_name4 = iguana::field_string<&person::str>();
  CHECK(field_name1 == "color");
  CHECK(field_name2 == "id");
  CHECK(field_name3 == "s");
  CHECK(field_name4 == "str");
}

rename enum_reflection to field_reflection

@qicosmos qicosmos merged commit 53becba into master Jul 9, 2024
21 checks passed
@qicosmos qicosmos deleted the field_name branch July 9, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant