This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

### 1377. The revised `forward` is not compatible with access-control

Section: 22.2 [utility] Status: Resolved Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [utility].

View all issues with Resolved status.

Discussion:

Addresses US-90

In n3090, at variance with previous iterations of the idea discussed in papers and incorporated in WDs, `std::forward` is constrained via `std::is_convertible`, thus is not robust wrt access control. This causes problems in normal uses as implementation detail of member functions. For example, the following snippet leads to a compile time failure, whereas that was not the case for an implementation along the lines of n2835 (using `enable_if`s instead of concepts for the constraining, of course)

    #include <utility>
    struct Base { Base(Base&&); };

    struct Derived
      : private Base
    {
      Derived(Derived&& d)
        : Base(std::forward<Base>(d)) { }
    };

In other terms, LWG 1054 can be resolved in a better way, the present status is not acceptable.

[ 2010-10-24 Daniel adds: ]

> Accepting n3143 would solve this issue.

Proposed resolution:

Resolved as NAD Editorial by paper n3143.