Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::filesystem::path::assign

      From cppreference.com
      <cpp‎ |filesystem‎ |path
       
       
      Filesystem library
      Classes
      Functions
      File types
       
      std::filesystem::path
      Member types
      Member constants
      Member functions
      Path decomposition
      Non-member functions
      (until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
      Helper classes
       
      path& assign( string_type&& source);
      (1)(since C++17)
      template<class Source>
      path& assign(const Source& source);
      (2)(since C++17)
      template<class InputIt>
      path& assign( InputIt first, InputIt last);
      (3)(since C++17)

      Replaces the contents to thepath object by a new pathname constructed from the given character sequence.

      1) Assigns the pathname identified by the detected-format stringsource, which is left in valid, but unspecified state.
      2) Assigns the pathname identified by the detected-format character rangesource.
      3) Assigns the pathname identified by detected-format character range[first, last).

      (2) participates in overload resolution only ifSource andpath are not the same type, and either:

      Contents

      [edit]Parameters

      source - a character range to use, represented asstd::string,std::string_view, pointer to a null-terminated multibyte string, or as an input iterator with char value type that points to a null-terminated multibyte string
      first, last - a character range to use
      Type requirements
      -
      InputIt must meet the requirements ofLegacyInputIterator.
      -
      The value type ofInputIt must be one of the encoded character types (char,wchar_t,char16_t andchar32_t)

      [edit]Return value

      *this

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 3244C++17constraint thatSource cannot bepath was missingadded

      [edit]See also

      assigns another path
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/path/assign&oldid=136523"

      [8]ページ先頭

      ©2009-2025 Movatter.jp