mirror of
https://github.com/boostorg/json.git
synced 2026-02-13 00:22:21 +00:00
Doc work
This commit is contained in:
@@ -1640,10 +1640,19 @@ private:
|
||||
@par Preconditions
|
||||
|
||||
`&lhs != &rhs`
|
||||
|
||||
@par Complexity
|
||||
|
||||
@param lhs The array to swap.
|
||||
Constant or linear in `lhs.size() + rhs.size()`.
|
||||
|
||||
@param rhs The array to swap.
|
||||
@par Exception Safety
|
||||
|
||||
Strong guarantee.
|
||||
Calls to @ref storage::allocate may throw.
|
||||
|
||||
@param lhs The array to exchange.
|
||||
|
||||
@param rhs The array to exchange.
|
||||
*/
|
||||
inline
|
||||
void
|
||||
|
||||
@@ -102,7 +102,11 @@ public:
|
||||
std::random_access_iterator_tag)
|
||||
: string_impl(last - first, sp)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
std::copy(first, last, data());
|
||||
#else
|
||||
std::copy(first, last, data(), data() + size());
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class InputIt>
|
||||
|
||||
@@ -438,12 +438,12 @@ void
|
||||
array::
|
||||
swap(array& other)
|
||||
{
|
||||
BOOST_JSON_ASSERT(this != &other);
|
||||
if(*sp_ == *other.sp_)
|
||||
{
|
||||
impl_.swap(other.impl_);
|
||||
return;
|
||||
}
|
||||
|
||||
array temp1(
|
||||
std::move(*this),
|
||||
other.storage());
|
||||
|
||||
@@ -272,6 +272,7 @@ void
|
||||
object::
|
||||
swap(object& other)
|
||||
{
|
||||
BOOST_JSON_ASSERT(this != &other);
|
||||
if(*sp_ == *other.sp_)
|
||||
{
|
||||
impl_.swap(other.impl_);
|
||||
|
||||
@@ -284,12 +284,12 @@ void
|
||||
string::
|
||||
swap(string& other)
|
||||
{
|
||||
BOOST_JSON_ASSERT(this != &other);
|
||||
if(*sp_ == *other.sp_)
|
||||
{
|
||||
std::swap(impl_, other.impl_);
|
||||
return;
|
||||
}
|
||||
|
||||
string temp1(
|
||||
std::move(*this), other.sp_);
|
||||
string temp2(
|
||||
@@ -323,14 +323,6 @@ reserve_impl(size_type new_cap)
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, string const& s)
|
||||
{
|
||||
return os << static_cast<string_view>(s);
|
||||
}
|
||||
|
||||
} // json
|
||||
} // boost
|
||||
|
||||
|
||||
@@ -1406,10 +1406,19 @@ private:
|
||||
@par Preconditions
|
||||
|
||||
`&lhs != &rhs`
|
||||
|
||||
@par Complexity
|
||||
|
||||
@param lhs The array to swap.
|
||||
Constant or linear in `lhs.size() + rhs.size()`.
|
||||
|
||||
@param rhs The array to swap.
|
||||
@par Exception Safety
|
||||
|
||||
Strong guarantee.
|
||||
Calls to @ref storage::allocate may throw.
|
||||
|
||||
@param lhs The object to exchange.
|
||||
|
||||
@param rhs The object to exchange.
|
||||
*/
|
||||
inline
|
||||
void
|
||||
|
||||
@@ -2556,17 +2556,6 @@ public:
|
||||
return string_view(*this).find_last_not_of(t, pos);
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
|
||||
/** Perform stream output.
|
||||
|
||||
Behaves as a formatted output function.
|
||||
*/
|
||||
BOOST_JSON_DECL
|
||||
friend
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, string const& s);
|
||||
|
||||
private:
|
||||
class undo;
|
||||
|
||||
@@ -2620,10 +2609,19 @@ private:
|
||||
@par Preconditions
|
||||
|
||||
`&lhs != &rhs`
|
||||
|
||||
@par Complexity
|
||||
|
||||
@param lhs The string to swap.
|
||||
Constant or linear in `lhs.size() + rhs.size()`.
|
||||
|
||||
@param rhs The string to swap.
|
||||
@par Exception Safety
|
||||
|
||||
Strong guarantee.
|
||||
Calls to @ref storage::allocate may throw.
|
||||
|
||||
@param lhs The string to exchange.
|
||||
|
||||
@param rhs The string to exchange.
|
||||
*/
|
||||
inline
|
||||
void
|
||||
@@ -2634,6 +2632,17 @@ swap(string& lhs, string& rhs)
|
||||
|
||||
//----------------------------------------------------------
|
||||
|
||||
/** Perform stream output.
|
||||
|
||||
Behaves as a formatted output function.
|
||||
*/
|
||||
inline
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, string const& s)
|
||||
{
|
||||
return os << static_cast<string_view>(s);
|
||||
}
|
||||
|
||||
/** Return true if lhs equals rhs.
|
||||
|
||||
A lexicographical comparison is used.
|
||||
|
||||
Reference in New Issue
Block a user