Skip to content

Commit db6bf15

Browse files
committed
Allow all array/object/etc. to be copied
1 parent 3aa3175 commit db6bf15

File tree

8 files changed

+0
-51
lines changed

8 files changed

+0
-51
lines changed

include/simdjson/generic/ondemand/array.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class array {
1818
* Exists so you can declare a variable and later assign to it before use.
1919
*/
2020
simdjson_really_inline array() noexcept = default;
21-
simdjson_really_inline array(array &&other) noexcept = default;
22-
simdjson_really_inline array &operator=(array &&other) noexcept = default;
23-
array(const array &) = delete;
24-
array &operator=(const array &) = delete;
2521

2622
/**
2723
* Begin array iteration.
@@ -96,10 +92,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> : public SIMDJS
9692
public:
9793
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array &&value) noexcept; ///< @private
9894
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
99-
10095
simdjson_really_inline simdjson_result() noexcept = default;
101-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> &&a) noexcept = default;
102-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
10396

10497
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> begin() noexcept;
10598
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> end() noexcept;

include/simdjson/generic/ondemand/array_iterator.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> : publ
7575
public:
7676
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&value) noexcept; ///< @private
7777
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
78-
7978
simdjson_really_inline simdjson_result() noexcept = default;
80-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &&a) noexcept = default;
81-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
8279

8380
//
8481
// Iterator interface

include/simdjson/generic/ondemand/field.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ class field : public std::pair<raw_json_string, value> {
2020
*/
2121
simdjson_really_inline field() noexcept;
2222

23-
simdjson_really_inline field(field &&other) noexcept = default;
24-
simdjson_really_inline field &operator=(field &&other) noexcept = default;
25-
simdjson_really_inline field(const field &other) noexcept = delete;
26-
simdjson_really_inline field &operator=(const field &other) noexcept = delete;
27-
2823
/**
2924
* Get the key as a string_view (for higher speed, consider raw_key).
3025
* We deliberately use a more cumbersome name (unescaped_key) to force users
@@ -67,10 +62,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> : public SIMDJS
6762
public:
6863
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::field &&value) noexcept; ///< @private
6964
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
70-
7165
simdjson_really_inline simdjson_result() noexcept = default;
72-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> &&a) noexcept = default;
73-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
7466

7567
simdjson_really_inline simdjson_result<std::string_view> unescaped_key() noexcept;
7668
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> key() noexcept;

include/simdjson/generic/ondemand/object.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ class object {
1616
*/
1717
simdjson_really_inline object() noexcept = default;
1818

19-
simdjson_really_inline object(object &&other) noexcept = default;
20-
simdjson_really_inline object &operator=(object &&other) noexcept = default;
21-
object(const object &) = delete;
22-
object &operator=(const object &) = delete;
23-
2419
simdjson_really_inline object_iterator begin() noexcept;
2520
simdjson_really_inline object_iterator end() noexcept;
2621

@@ -76,10 +71,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> : public SIMDJ
7671
public:
7772
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object &&value) noexcept; ///< @private
7873
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
79-
8074
simdjson_really_inline simdjson_result() noexcept = default;
81-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> &&a) noexcept = default;
82-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
8375

8476
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> begin() noexcept;
8577
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> end() noexcept;

include/simdjson/generic/ondemand/object_iterator.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ class object_iterator {
1515
*/
1616
simdjson_really_inline object_iterator() noexcept = default;
1717

18-
simdjson_really_inline object_iterator(const object_iterator &o) noexcept = default;
19-
simdjson_really_inline object_iterator &operator=(const object_iterator &o) noexcept = default;
20-
2118
//
2219
// Iterator interface
2320
//
@@ -71,10 +68,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> : pub
7168
public:
7269
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object_iterator &&value) noexcept; ///< @private
7370
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
74-
7571
simdjson_really_inline simdjson_result() noexcept = default;
76-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &&a) noexcept = default;
77-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
7872

7973
//
8074
// Iterator interface

include/simdjson/generic/ondemand/raw_json_string.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class raw_json_string {
3232
*/
3333
simdjson_really_inline raw_json_string() noexcept = default;
3434

35-
simdjson_really_inline raw_json_string(const raw_json_string &other) noexcept = default;
36-
simdjson_really_inline raw_json_string &operator=(const raw_json_string &other) noexcept = default;
37-
3835
/**
3936
* Create a new invalid raw_json_string pointed at the given location in the JSON.
4037
*

include/simdjson/generic/ondemand/value.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ class value {
2222
*/
2323
simdjson_really_inline value() noexcept = default;
2424

25-
simdjson_really_inline value(value &&other) noexcept = default;
26-
simdjson_really_inline value &operator=(value && other) noexcept = default;
27-
simdjson_really_inline value(const value &) noexcept = default;
28-
simdjson_really_inline value &operator=(const value &) noexcept = default;
29-
simdjson_really_inline ~value() noexcept = default;
30-
3125
/**
3226
* Get this value as the given type.
3327
*
@@ -310,10 +304,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> : public SIMDJS
310304
public:
311305
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value &&value) noexcept; ///< @private
312306
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
313-
314307
simdjson_really_inline simdjson_result() noexcept = default;
315-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> &&a) noexcept = default;
316-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
317308

318309
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() && noexcept;
319310
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;

include/simdjson/generic/ondemand/value_iterator.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ class value_iterator {
2626

2727
public:
2828
simdjson_really_inline value_iterator() noexcept = default;
29-
simdjson_really_inline value_iterator(value_iterator &&other) noexcept = default;
30-
simdjson_really_inline value_iterator &operator=(value_iterator &&other) noexcept = default;
31-
simdjson_really_inline value_iterator(const value_iterator &other) noexcept = default;
32-
simdjson_really_inline value_iterator &operator=(const value_iterator &other) noexcept = default;
3329

3430
/**
3531
* Denote that we're starting a document.
@@ -276,10 +272,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> : publ
276272
public:
277273
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept; ///< @private
278274
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
279-
280275
simdjson_really_inline simdjson_result() noexcept = default;
281-
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> &&a) noexcept = default;
282-
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
283276
};
284277

285278
} // namespace simdjson

0 commit comments

Comments
 (0)