std::experimental::filesystem::path::concat, std::experimental::filesystem::path::operator+=
Min standard notice:
Concatenates the current path and the argument.
# Declarations
path& operator+=( const path& p );
(filesystem TS)
path& operator+=( const string_type& str );
(filesystem TS)
path& operator+=( const value_type* ptr );
(filesystem TS)
path& operator+=( value_type x );
(filesystem TS)
template< class Source >
path& operator+=( const Source& source );
(filesystem TS)
template< class CharT >
path& operator+=( CharT x );
(filesystem TS)
template< class Source >
path& concat( const Source& source );
(filesystem TS)
template< class InputIt >
path& concat( InputIterator first, InputIterator last );
(filesystem TS)
# Parameters
p: path to appendstr: string to appendptr: pointer to the beginning of a null-terminated string to appendx: single character to appendsource: std::basic_string, null-terminated multicharacter string, or an input iterator pointing to a null-terminated multicharacter sequence, which represents a path name (either in portable or in native format)first, last: pair of LegacyInputIterators that specify a multicharacter sequence that represents a path name
# Return value
*this
# Notes
Unlike with append() or operator/=, additional directory separators are never introduced.
# Example
#include <experimental/filesystem>
#include <iostream>
namespace fs = std::experimental::filesystem;
int main()
{
fs::path p1; // empty path
p1 += "var"; // does not insert a separator
std::cout << "\"\" + \"var\" == " << p1 << '\n';
p1 += "lib"; // does not insert a separator
std::cout << "\"\" + \"var\" + \"lib\" == " << p1 << '\n';
}