GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::experimental::filesystem::path::operator=(3) C++ Standard Libary std::experimental::filesystem::path::operator=(3)

std::experimental::filesystem::path::operator= - std::experimental::filesystem::path::operator=


path& operator=( const path& p ); (1) (filesystem TS)
path& operator=( path&& p ); (2) (filesystem TS)
template< class Source > (2) (filesystem TS)
path& operator=( const Source& source );


1) Replaces the contents of *this with a copy of the contents of p.
2) Replaces the contents of *this with p, possibly using move semantics: p is left
in valid, but unspecified state.
3) Replaces the contents of *this with a new path value constructed from source as
if by overload (4) of the path constructor. Equivalent to assign(source).


p - a path to assign
a std::basic_string, pointer to a null-terminated character/wide character
source - string, or an input iterator that points to a null-terminated
character/wide character sequence. The character type must be one of char,
char16_t, char32_t, wchar_t


*this


1) (none)
2)
noexcept specification:
noexcept
3) (none)

// Run this code


#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
int main()
{
fs::path p = "C:/users/abcdef/AppData/Local";
p = p / "Temp"; // move assignment
const wchar_t* wstr = L"D:/猫.txt";
p = wstr; // assignment from a source
}


assign assigns contents
(public member function)
constructor constructs a path
(public member function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.