This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::pair copy and move constructor
On 03/07/2013 09:30 PM, Daniel Krügler wrote:
I would like to mention that I withdraw my proposal to submit a
library issue to allow to implement std::pair using a base class to
hold the data members, based on the test case template <class T, class
U, U T::*> struct A{}; which would break for A<std::pair<int, int>,
int, &std::pair<int, int>::first> a; So I agree that a core language
change would be useful. - Daniel
I agree, the core language feature will help resolving this kind of
problem not only for std::pair but also for std::tuple or any user
defined type.
I start looking at how to allow it in the Standard and it could be done
with a point 6 in paragraph 8.4.2:
6 A defaulted function defined as deleted shall not participate in
overload resolution (13.3)
This would let the compiler consider challengers for this kind of function.
But, even if I would appreciate feedback from people on this mailing
list, it is perhaps not the best place to discuss about it, no ? Where
should I submit it ?
François