Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.33 KB

File metadata and controls

30 lines (26 loc) · 1.33 KB

str

  • sstream[meta header]
  • std[meta namespace]
  • basic_stringbuf[meta class]
  • function[meta id-type]
basic_string<CharT, Traits, Allocator> str() const;                // (1) C++03
basic_string<CharT, Traits, Allocator> str() const &;              // (1) C++20
template <class SAlloc>
basic_string<CharT, Traits, SAlloc> str(const SAlloc& sa) const;   // (2) C++20
basic_string<CharT, Traits, Allocator> str() &&;                   // (3) C++20

void str(const basic_string<CharT, Traits, Allocator>& s);  // (4)
template <class SAlloc>
void str(const basic_string<CharT, Traits, SAlloc>& s);     // (5) C++20
void str(const basic_string<CharT, Traits, Allocator>&& s); // (6) C++20
  • basic_string[link /reference/string/basic_string.md]

概要

文字列オブジェクトを取得または設定する。

効果

  • (1) : 文字列オブジェクトを取得する
  • (2) : 文字列オブジェクトを取得して、SAlloc型のアロケータsaによって確保する
  • (3) : 保持する文字列オブジェクトをムーブして取得する
  • (4) : 文字列オブジェクトsを設定する
  • (5) : SAlloc型のアロケータによって確保されているデータをコピーして、文字列オブジェクトsを設定する
  • (6) : 与えられた文字列オブジェクトsをムーブして設定する