LWG2707 init filesystem::path from string_type&&
* include/experimental/bits/fs_path.h (path::path(string_type&&)) (path::operator=(string&&), path::assign(string_type&&)): Define construction and assignment from string_type rvalues (LWG 2707). From-SVN: r241416
This commit is contained in:
parent
67a6cac73c
commit
e59e183f69
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-10-21 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/experimental/bits/fs_path.h (path::path(string_type&&))
|
||||
(path::operator=(string&&), path::assign(string_type&&)): Define
|
||||
construction and assignment from string_type rvalues (LWG 2707).
|
||||
|
||||
2016-10-21 Eelis van der Weegen <eelis@eelis.net>
|
||||
|
||||
* include/bits/stl_algo.h (__gen_two_uniform_ints): Move logic out
|
||||
|
|
|
@ -159,6 +159,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||
__p.clear();
|
||||
}
|
||||
|
||||
path(string_type&& __source)
|
||||
: _M_pathname(std::move(__source))
|
||||
{ _M_split_cmpts(); }
|
||||
|
||||
template<typename _Source,
|
||||
typename _Require = _Path<_Source>>
|
||||
path(_Source const& __source)
|
||||
|
@ -193,6 +197,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||
|
||||
path& operator=(const path& __p) = default;
|
||||
path& operator=(path&& __p) noexcept;
|
||||
path& operator=(string_type&& __source);
|
||||
path& assign(string_type&& __source);
|
||||
|
||||
template<typename _Source>
|
||||
_Path<_Source>&
|
||||
|
@ -721,6 +727,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||
return *this;
|
||||
}
|
||||
|
||||
inline path&
|
||||
path::operator=(string_type&& __source)
|
||||
{ return *this = path(std::move(__source)); }
|
||||
|
||||
inline path&
|
||||
path::assign(string_type&& __source)
|
||||
{ return *this = path(std::move(__source)); }
|
||||
|
||||
inline path&
|
||||
path::operator+=(const path& __p)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue