Does frameworks allow move semantics unconditionally?
Milian Wolff
mail at milianw.de
Sat Aug 1 12:37:47 UTC 2015
On Friday, July 31, 2015 07:15:55 PM Mark Gaiser wrote:
> On Fri, Jul 31, 2015 at 3:11 PM, Alex Merry <alex.merry at kde.org> wrote:
> > On Thursday 30 July 2015 20:46:24 Mark Gaiser wrote:
> > > On Thu, Jul 23, 2015 at 9:59 PM, Mark Gaiser <markg85 at gmail.com> wrote:
> > > > Hi,
> > > >
> > > > The wiki page doesn't state it explicitly [1].
> > > >
> > > > The status of move semantics when searching for the status of N3053 on
> >
> > the
> >
> > > > compilers that frameworks support:
> > > > GCC 4.6 [2] (frameworks requires 4.5)
> > > > CLANG 3.0 [3] (frameworks requires 3.1)
> > > > Visual Studio 2010/2012 [4] (it has some (most?) move semantics with
> >
> > N3053
> >
> > > > being implemented in 2015. But has it enough till 2012 for normal move
> > > > semantics? That i don't know.)
> > > >
> > > > Allowing this unconditionally (with the exception of *this since
> > > > that's
> > > > apparently fixed in GCC 4.8.1) seems possible since the compiler
> >
> > support
> >
> > > > seems there and the operation - when implemented - can give quite nice
> > > > benefits.
> >
> > Our only language constraints are what is allowed by the compilers we
> > support.
> >
> > I know that VS 2013 has most move semantics support except that the
> > compiler
> > can't generate default move constructors and move assignment operators.
> >
> > The VS 2010 compiler provides rvalue references, but not always as
> > effeciently
> > as you'd like (it doesn't properly account for temporary values, if I
> > understand the explanation correctly). What I'm not certain about is the
> > standard library support on this front, but I think it's basically absent
> > from
> > 2010 and mostly present in 2012.
> >
> > So when you say "move semantics", what does that encompass? You can use
> > rvalue
> > references in 2010 just fine, but someone would need to check that Qt
> > detects
> > that properly and provides appropriate overloads of various methods, and
> > you
> > may not get std::move (if you use qMove, it will degrade properly in
> > std::move's absence, though).
> >
> > Alex
> > _______________________________________________
> > Kde-frameworks-devel mailing list
> > Kde-frameworks-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
>
> Hi Alex,
>
> What i mean with "move semantics" are mainly the following features:
> - std::move
> - move copy constructor
> - move assignment operator
>
> I know std::move is in vs2010, i'm just not so sure about the move copy and
> assignment operator. Same for clang. I can't really find where clang
> started to support these things.
For clang, check http://clang.llvm.org/cxx_status.html - RValue references got supported in 2.9.
Cheers
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150801/04ba9198/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150801/04ba9198/attachment-0001.sig>
More information about the Kde-frameworks-devel
mailing list