114
114
115
115
#pragma once
116
116
117
- #include < chrono> // for duration<>
118
- #include < map> // for map<>
119
117
#include < memory> // for shared_ptr<>
120
118
#include < string> // for string
121
119
#include < type_traits> // for enable_if_t<>, is_arithmetic<>, is_enum<>, ...
@@ -179,25 +177,25 @@ class Schema : public schema::Interface {
179
177
Schema& operator =(const Schema&) = default ;
180
178
181
179
// Struct
182
- Schema (std::string&& desc, schema::PropertyList<> props)
180
+ Schema (std::string desc, schema::PropertyList<> props)
183
181
: impl_(new schema::Struct(std::move(desc), props)) {}
184
182
185
183
Schema (schema::PropertyList<> props) : Schema(" " , props) {}
186
184
187
- Schema (std::string&& desc, const Schema& base, schema::PropertyList<> props)
185
+ Schema (std::string desc, const Schema& base, schema::PropertyList<> props)
188
186
: impl_(new schema::Struct(std::move(desc), base, props)) {}
189
187
190
188
Schema (const Schema& base, schema::PropertyList<> props) : Schema(" " , base, props) {}
191
189
192
190
// Variant
193
191
Schema (const std::vector<Schema>& xs); // NOLINT(runtime/explicit)
194
- Schema (std::string&& desc, const std::vector<Schema>& xs);
192
+ Schema (std::string desc, const std::vector<Schema>& xs);
195
193
196
194
Schema (schema::BoxList props); // NOLINT(runtime/explicit)
197
- Schema (std::string&& desc, schema::BoxList props);
195
+ Schema (std::string desc, schema::BoxList props);
198
196
199
197
Schema (schema::BoxVec&& props); // NOLINT(runtime/explicit)
200
- Schema (std::string&& desc, schema::BoxVec&& props);
198
+ Schema (std::string desc, schema::BoxVec&& props);
201
199
202
200
// Interface
203
201
template <typename T, std::enable_if_t <std::is_base_of_v<schema::Interface, T>, int > = 0 >
@@ -209,19 +207,19 @@ class Schema : public schema::Interface {
209
207
210
208
// Ignore
211
209
Schema () : impl_(new schema::Ignore(" " )) {}
212
- explicit Schema (std::string&& desc, JsonType t = JsonType::object)
210
+ explicit Schema (std::string desc, JsonType t = JsonType::object)
213
211
: impl_(new schema::Ignore(std::move(desc), t)) {}
214
212
215
213
// Primitives
216
214
template <typename T>
217
- Schema (T* ptr, std::string&& desc) : impl_(make_schema(ptr, std::move(desc)).clone()) {}
215
+ Schema (T* ptr, std::string desc) : impl_(make_schema(ptr, std::move(desc)).clone()) {}
218
216
template <typename T>
219
- Schema (T* ptr, const schema::Box& prototype, std::string&& desc)
217
+ Schema (T* ptr, const schema::Box& prototype, std::string desc)
220
218
: impl_(make_schema(ptr, prototype, std::move(desc)).clone()) {}
221
219
222
220
// FromJson
223
221
template <typename T>
224
- Schema (T* ptr, JsonType t, std::string&& desc)
222
+ Schema (T* ptr, JsonType t, std::string desc)
225
223
: impl_(new schema::FromJson<T>(ptr, t, std::move(desc))) {}
226
224
227
225
public: // Special
0 commit comments