Allow all array/object/etc. to be copied

This commit is contained in:
John Keiser
2020-12-06 16:29:53 -08:00
parent 3aa3175378
commit db6bf15361
8 changed files with 0 additions and 51 deletions
@@ -18,10 +18,6 @@ public:
* Exists so you can declare a variable and later assign to it before use.
*/
simdjson_really_inline array() noexcept = default;
simdjson_really_inline array(array &&other) noexcept = default;
simdjson_really_inline array &operator=(array &&other) noexcept = default;
array(const array &) = delete;
array &operator=(const array &) = delete;
/**
* Begin array iteration.
@@ -96,10 +92,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> : public SIMDJS
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> begin() noexcept;
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> end() noexcept;
@@ -75,10 +75,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> : publ
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
//
// Iterator interface
@@ -20,11 +20,6 @@ public:
*/
simdjson_really_inline field() noexcept;
simdjson_really_inline field(field &&other) noexcept = default;
simdjson_really_inline field &operator=(field &&other) noexcept = default;
simdjson_really_inline field(const field &other) noexcept = delete;
simdjson_really_inline field &operator=(const field &other) noexcept = delete;
/**
* Get the key as a string_view (for higher speed, consider raw_key).
* 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
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::field &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
simdjson_really_inline simdjson_result<std::string_view> unescaped_key() noexcept;
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> key() noexcept;
@@ -16,11 +16,6 @@ public:
*/
simdjson_really_inline object() noexcept = default;
simdjson_really_inline object(object &&other) noexcept = default;
simdjson_really_inline object &operator=(object &&other) noexcept = default;
object(const object &) = delete;
object &operator=(const object &) = delete;
simdjson_really_inline object_iterator begin() noexcept;
simdjson_really_inline object_iterator end() noexcept;
@@ -76,10 +71,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> : public SIMDJ
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> begin() noexcept;
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> end() noexcept;
@@ -15,9 +15,6 @@ public:
*/
simdjson_really_inline object_iterator() noexcept = default;
simdjson_really_inline object_iterator(const object_iterator &o) noexcept = default;
simdjson_really_inline object_iterator &operator=(const object_iterator &o) noexcept = default;
//
// Iterator interface
//
@@ -71,10 +68,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> : pub
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object_iterator &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
//
// Iterator interface
@@ -32,9 +32,6 @@ public:
*/
simdjson_really_inline raw_json_string() noexcept = default;
simdjson_really_inline raw_json_string(const raw_json_string &other) noexcept = default;
simdjson_really_inline raw_json_string &operator=(const raw_json_string &other) noexcept = default;
/**
* Create a new invalid raw_json_string pointed at the given location in the JSON.
*
@@ -22,12 +22,6 @@ public:
*/
simdjson_really_inline value() noexcept = default;
simdjson_really_inline value(value &&other) noexcept = default;
simdjson_really_inline value &operator=(value && other) noexcept = default;
simdjson_really_inline value(const value &) noexcept = default;
simdjson_really_inline value &operator=(const value &) noexcept = default;
simdjson_really_inline ~value() noexcept = default;
/**
* Get this value as the given type.
*
@@ -310,10 +304,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> : public SIMDJS
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() && noexcept;
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;
@@ -26,10 +26,6 @@ protected:
public:
simdjson_really_inline value_iterator() noexcept = default;
simdjson_really_inline value_iterator(value_iterator &&other) noexcept = default;
simdjson_really_inline value_iterator &operator=(value_iterator &&other) noexcept = default;
simdjson_really_inline value_iterator(const value_iterator &other) noexcept = default;
simdjson_really_inline value_iterator &operator=(const value_iterator &other) noexcept = default;
/**
* Denote that we're starting a document.
@@ -276,10 +272,7 @@ struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> : publ
public:
simdjson_really_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept; ///< @private
simdjson_really_inline simdjson_result(error_code error) noexcept; ///< @private
simdjson_really_inline simdjson_result() noexcept = default;
simdjson_really_inline simdjson_result(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> &&a) noexcept = default;
simdjson_really_inline ~simdjson_result() noexcept = default; ///< @private
};
} // namespace simdjson