swap overloads
Synopses
Declared in <bdljsn_error.h>
Exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise.
Exchange the value of the specified a Json object with that of the specified b Json object. If an exception is thrown, both objects are left in valid but unspecified states. This operation guarantees O[1] complexity. The behavior is undefined unless a was created with the same allocator as b.
Exchange the value of the specified a JsonArray with that of the specified b JsonArray. This function provides the no‐throw exception‐safety guarantee. This operation has O[1]complexity if a was created with the same allocator as b; otherwise, it has O[n+m] complexity, where n and m are the number of elements in a and b, respectively.
Exchange the values of the specified a and b objects. This exception provides the no‐throw exception‐safety guarantee. Note that, since a and b have the same value (a class invariant), this operation is a no‐op.
Exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise.
void
swap(
JsonNumber& a,
JsonNumber& b);
Exchange the value of the specified a JsonObject with that of the specified b JsonObject. This function provides the no‐throw exception‐safety guarantee. This operation has O[1]complexity if a was created with the same allocator as b; otherwise, it has O[n+m] complexity, where n and m are the number of elements in a and b, respectively.
void
swap(
JsonObject& a,
JsonObject& b);
Exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee.
Created with MrDocs