value::operator=

Assignment.

Synopsis

value&
operator=(
    signed char i) noexcept; (1)

value&
operator=(
    short i) noexcept; (2)

value&
operator=(
    int i) noexcept; (3)

value&
operator=(
    long i) noexcept; (4)

value&
operator=(
    long long i) noexcept; (5)

value&
operator=(
    unsigned char u) noexcept; (6)

value&
operator=(
    unsigned short u) noexcept; (7)

value&
operator=(
    unsigned int u) noexcept; (8)

value&
operator=(
    unsigned long u) noexcept; (9)

value&
operator=(
    unsigned long long u) noexcept; (10)

value&
operator=(
    string_view s); (11)

value&
operator=(
    char const* s); (12)

value&
operator=(
    string const& s); (13)

value&
operator=(
    std::initializer_list< value_ref > init); (14)

value&
operator=(
    std::nullptr_t) noexcept; (15)

value&
operator=(
    bool b) noexcept; (16)

value&
operator=(
    double d) noexcept; (17)

value&
operator=(
    string&& s); (18)

value&
operator=(
    array const& arr); (19)

value&
operator=(
    array&& arr); (20)

value&
operator=(
    object const& obj); (21)

value&
operator=(
    object&& obj); (22)

value&
operator=(
    value const& other); (23)

value&
operator=(
    value&& other); (24)

Description

Replace *this with i.

Exception Safety

No-throw guarantee.

Complexity

Linear in the size of *this.

Parameters

Name Description

i

The new value.

u

The new value.

s

The new string.

init

The initializer list to assign from.

b

The new value.

d

The new value.

arr

The new array.

obj

The new object.

other

The value to copy.