Title
Pointer conversions between archetypes
Status
concepts
Section
7.3.12 [conv.ptr]
Submitter
James Widman

Created on 2009-06-12.00:00:00 last changed 179 months ago

Messages

Date: 2009-06-12.00:00:00

Given an example like:

    auto concept Conv<typename T, typename U> {
      U::U(T&&);
      U::U(const U&);
      U::~U();
    };

    template<typename U, typename T>
    requires Conv<T*, U*>
    U* f(T* p) {
      return static_cast<T*&&>(p);
    }

There is currently no normative wording that makes a T* convertible to a U* in the return statement.

One possible approach would be to take the concept map archetype as specifying an additional case for the pointer conversions in 7.3.12 [conv.ptr].

History
Date User Action Args
2009-08-03 00:00:00adminsetstatus: open -> concepts
2009-06-12 00:00:00admincreate