Opened 8 years ago

Closed 7 years ago

#10291 closed Bugs (fixed)

path doesn't have move constructor/assignment operator

Reported by: vlovich@… 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 anonymous, 8 years ago

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.

comment:2 by Beman Dawes, 8 years ago

Milestone: To Be DeterminedBoost 1.57.0
Status: newassigned

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 Beman Dawes, 7 years ago

Milestone: Boost 1.57.0Boost 1.60.0
Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.