Does frameworks allow move semantics unconditionally?
Alex Merry
alex.merry at kde.org
Fri Jul 31 20:21:07 UTC 2015
On Friday 31 July 2015 21:27:45 Mark Gaiser wrote:
> So the one thing we know fairly certain right now is that MSVC 2012 is not
> going to be the deal breaker here.
> I'm still not 100% sure about GCC and Clang though..
Well, the pages you linked to in your earlier email said GCC supports rvalue
references since 4.3 (except *this, but I don't think that's a big deal) [0],
while clang has supported them since 2.9 [1].
In fact, the compiler requirements page you linked says that rvalue references
(except *this) are unconditionally supported in Frameworks. I guess you were
looking for the text "move semantics", but they're essentially the same thing
(rvalues are the language feature required to implement move semantics).
I mean, I guess there's also standard library support, although we don't care
that much about the containers, since we use Qt equivalent.
libstdc++ (GNU's implementation) has supported the move and forward helpers
since at least GCC 4.6 [3] (that's the earliest version of the libstdc++
manual that's online), and I would be surprised if they weren't in at least
GCC 4.4.
MSVC has the move and forward helpers in 2010, as I've mentioned [4].
libc++ (LLVM's implementation for Clang) is irritatingly vague about when any
particular feature was implemented, but I'd be highly surprised if whatever
libc++ shipped with Clang 3.0, let alone 3.1, didn't include move and forward.
tl;dr: yes, you can use move semantics. I'll make that more explicit on the
wiki page.
Alex
[0]: https://gcc.gnu.org/projects/cxx0x.html
[1]: http://clang.llvm.org/cxx_status.html
[2]: https://community.kde.org/Frameworks/
Policies#Frameworks_compiler_requirements_and_C.2B.2B11
[3]: https://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/manual/manual/
status.html#status.iso.200x
[4]: https://msdn.microsoft.com/en-us/library/0ah2zh0s%28v=vs.100%29.aspx
More information about the Kde-frameworks-devel
mailing list