Opened 8 years ago
Closed 7 years ago
#10291 closed Bugs (fixed)
path doesn't have move constructor/assignment operator
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | filesystem |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
path specifies an explicit copy constructor & assigment operator which AFAIK turns off the implicit move constructor/assignment operator.
This violates the documentation & expected behaviour: adding a boost filesystem path as a member variable disallows the ability to have the default move constructor be noexcept move (need to explicitly define the move constructor).
Change History (3)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Milestone: | To Be Determined → Boost 1.57.0 |
---|---|
Status: | new → assigned |
Work has started to bring the library into alignment with the C++ committee File System Technical Specification. That should clear this problem. The ticket will be left open until the changes are committed.
Thanks,
--Beman
comment:3 by , 7 years ago
Milestone: | Boost 1.57.0 → Boost 1.60.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
For Boost 1.60.0 on compilers with the required C++11 features, the filesystem library will support move constructors and move assignments called for in the C++ File System Technical Specification, TS 18822.
These changes have been made on my local develop branch and testing is underway. They should be available in a day or two on the https://github.com/boostorg/filesystem develop branch, and will be merged to master as soon as sufficient regression tests have cycled.
Thanks,
--Beman
There are three solutions to this problem:
1) Delete the explicit copy constructor/copy assignment operator 2) Explicitly define the move constructor/assignment operator 3) Define the move constructor/assignment operator as = default
I personally prefer #1, then #3.