This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::pair copy and move constructor
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: Daniel Krügler <daniel dot kruegler at gmail dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 5 Mar 2013 21:49:59 +0000
- Subject: Re: std::pair copy and move constructor
- References: <511EA09D.8000704@gmail.com> <CAGNvRgCFOyoRmyGn5nDGR1xPkdVGiA15gxQX_34jpWb3PuDJfA@mail.gmail.com> <511F5589.6070906@gmail.com> <CAGNvRgC8PKzPewop5vBiq3K-j2Skte5-f-Shp_8vDEf7LucXNg@mail.gmail.com> <51365756.5060404@gmail.com>
On 5 March 2013 20:36, François Dumont wrote:
>
> I finally wonder if the compiler couldn't help here. If the copy
> assignment is deleted why wouldn't the compiler try to use the template
> assignment operator ?
If an operation is deleted that means the class author (implicitly or
explicitly) said "this operation is not allowed"
If the compiler finds a way to work around the author's intention by
choosing a different function then what's the point in having deleted
functions?