mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-07-02 14:04:09 +00:00
add doc: basic_astring operator=
This commit is contained in:
parent
5af5e8c300
commit
5f453b10f6
9 changed files with 385 additions and 52 deletions
|
@ -20,6 +20,19 @@ Returns
|
|||
|
||||
| ``*this``.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/assert.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
auto x = string<8>("homuhomu");
|
||||
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
|
||||
x.assign(y);
|
||||
SPROUT_ASSERT_MSG(x == y, "y is assigned to x.");
|
||||
|
||||
----
|
||||
|
||||
Interface
|
||||
|
@ -137,19 +150,6 @@ Returns
|
|||
|
||||
| ``*this``.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/assert.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
auto x = string<8>("homuhomu");
|
||||
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
|
||||
x.assign(y);
|
||||
SPROUT_ASSERT_MSG(x == y, "y is assigned to x.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
|
|
63
docs/_sources/libs/string/basic_string/operator-assign.txt
Normal file
63
docs/_sources/libs/string/basic_string/operator-assign.txt
Normal file
|
@ -0,0 +1,63 @@
|
|||
.. _sprout-string-basic_string-operator-assign:
|
||||
###############################################################################
|
||||
operator=
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
basic_string& operator=(basic_string const& rhs);
|
||||
|
||||
template<std::size_t N2, typename Enable = typename std::enable_if<(N2 != N)>::type>
|
||||
basic_string& operator=(basic_string<T, N2, Traits> const& rhs);
|
||||
|
||||
basic_string& operator=(value_type const* rhs);
|
||||
|
||||
Effects
|
||||
========================================
|
||||
|
||||
| Equivalent to ``assign(rhs)``.
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
| ``*this``.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/assert.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
auto x = string<8>("homuhomu");
|
||||
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
|
||||
x = y;
|
||||
SPROUT_ASSERT_MSG(x == y, "y is assigned to x.");
|
||||
|
||||
----
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
basic_string& operator=(value_type rhs);
|
||||
|
||||
Effects
|
||||
========================================
|
||||
|
||||
| Equivalent to ``assign(1, rhs)``.
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
| ``*this``.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/string.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue