Namespaces
Variants

std::experimental::basic_string_view<CharT,Traits>:: operator=

From cppreference.net
basic_string_view & operator = ( const basic_string_view & view ) noexcept = default ;
(bibliothèque fundamentals TS)

Remplace la vue par celle de view .

Table des matières

Paramètres

vue - vue à copier

Valeur de retour

* this

Complexité

Constante.

Exemple

#include <iostream>
#include <experimental/string_view>
int main()
{
    std::experimental::string_view v = "Hello, world";
    v = v.substr(7);
    std::cout << v << '\n';
}

Sortie :

world

Voir aussi

construit un basic_string_view
(fonction membre publique)