Constructors
Synopses
Declared in <folly/json/dynamic.h>
Default constructor, initializes with nullptr.
dynamic();
Copy constructor.
Move constructor.
Special handling for vector<bool>::const_reference.
Initializes as an empty string.
dynamic(std::nullptr_t s);
Special handling for vector<bool>.
dynamic(std::vector<bool>::reference b);
Initializes as a string.
dynamic(std::string s);
Plumbing for object() construction.
dynamic(ObjectMaker const& maker) = delete;
Plumbing for object() construction.
dynamic(ObjectMaker&& maker);
Initializes with strcpy.
dynamic(char const* s);
Plumbing for object() construction.
dynamic(ObjectMaker(* fn)());
Plumbing for array() construction.
dynamic(void(* fn)(EmptyArrayTag));
Initializes as a string.
template<typename Stringish>
requires is_detected_v<dynamic_detail::detect_construct_string, Stringish>
dynamic(Stringish&& s);
Constructor for integral and float types. Other types are SFINAEd out with NumericTypeHelper.
template<
class T,
class NumericType = NumericTypeHelper<T>::type>
dynamic(T t);
Constructs an array dynamic from the values of a range‐like object.
template<class Range>
dynamic(
array_range_construct_t tag,
Range&& range);
Create a dynamic that is an array of the values from the supplied iterator range. Used to construct a dynamic of array type from a supplied pair of iterators or from a range‐like object. Four equivalent forms ‐ see examples.
template<class Iterator>
dynamic(
array_range_construct_t tag,
Iterator first,
Iterator last);
Parameters
Name |
Description |
other |
The dynamic to copy. |
b |
The vector<bool> const element proxy to store as a boolean. |
s |
A null pointer. |
maker |
The ObjectMaker to build from (deleted lvalue overload). |
fn |
The object‐maker factory function. |
t |
The arithmetic value to store. |
tag |
The array‐range construction tag. |
range |
The range whose elements populate the array. |
first |
The iterator to the first element of the range. |
last |
The iterator past the last element of the range. |
Created with MrDocs