Skip to content

Commit 9dc102c

Browse files
author
Daniel Lemire
committed
name_of is obsolete, replaced by identifier_of
1 parent f3c2220 commit 9dc102c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

benchmarks/simpleparser/from_json.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void from_json(const JsonValue& j, T& obj) requires(simdjson::json_builder::User
4646

4747
// Using reflection to iterate over data members
4848
[:simdjson::json_builder::expand(std::meta::nonstatic_data_members_of(^T)):] >> [&]<auto dm> {
49-
constexpr auto name = std::meta::name_of(dm);
49+
constexpr auto name = std::meta::identifier_of(dm);
5050
auto it = j.object_value.find(std::string(reinterpret_cast<const char*>(name.data()), name.size()));
5151
if (it != j.object_value.end()) {
5252
from_json(it->second, obj.[:dm:]);

include/simdjson/json_builder/json_builder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ constexpr void atom(StringBuilder &b, const T &t) {
9393
b.append(',');
9494
constexpr auto v =
9595
simdjson::json_builder::json_escaping::to_quoted_escaped(
96-
std::meta::name_of(dm));
96+
std::meta::identifier_of(dm));
9797
b.append_unescaped(v);
9898
b.append(':');
9999
atom(b, t.[:dm:]);
@@ -111,7 +111,7 @@ template <class Z> void fast_to_json_string(StringBuilder &b, const Z &z) {
111111
b.append(',');
112112
constexpr auto v =
113113
simdjson::json_builder::json_escaping::to_quoted_escaped(
114-
std::meta::name_of(dm));
114+
std::meta::identifier_of(dm));
115115
b.append_unescaped(v);
116116
b.append(':');
117117
atom(b, z.[:dm:]);

0 commit comments

Comments
 (0)