Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::basic_regex<CharT,Traits>::operator=

      From cppreference.com
      <cpp‎ |regex‎ |basic regex
       
       
       
      Regular expressions library
      Classes
      (C++11)
      Algorithms
      Iterators
      Exceptions
      Traits
      Constants
      (C++11)
      Regex Grammar
       
       
      Defined in header<regex>
      basic_regex& operator=(const basic_regex& other);
      (1)(since C++11)
      basic_regex& operator=( basic_regex&& other)noexcept;
      (2)(since C++11)
      basic_regex& operator=(const CharT* ptr);
      (3)(since C++11)
      basic_regex& operator=(std::initializer_list<CharT> il);
      (4)(since C++11)
      template<class ST,class SA>
      basic_regex& operator=(conststd::basic_string<CharT,ST,SA>& p);
      (5)(since C++11)

      Assigns the contents.

      1) Copy assignment operator. Assigns the contents ofother. Equivalent toassign(other);.
      2) Move assignment operator. Assigns the contents ofother using move semantics.other is in valid, but unspecified state after the operation. Equivalent toassign(other);.
      3) Assigns a null-terminated character string pointed to byptr. Equivalent toassign(ptr);.
      4) Assigns characters contained in initializer listil. Equivalent toassign(il);.
      5) Assigns the contents of the stringp. Equivalent toassign(p);.

      Contents

      [edit]Parameters

      other - another regex object
      ptr - pointer to a null-terminated character string
      il - initializer list containing characters to assign
      p - string containing characters to assign

      [edit]Return value

      *this

      [edit]Exceptions

      1) May throw implementation-defined exceptions.
      3-5)std::regex_error if the supplied regular expression is not valid. The object is not modified in that case.

      [edit]See also

      assigns the contents
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/regex/basic_regex/operator%3D&oldid=161003"

      [8]ページ先頭

      ©2009-2025 Movatter.jp