Does frameworks allow move semantics unconditionally?

Aleix Pol aleixpol at kde.org
Fri Jul 31 17:50:39 UTC 2015


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.
>
> [1]
> https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11
> [2] https://gcc.gnu.org/projects/cxx0x.html
> [3] http://clang.llvm.org/cxx_status.html
> [4] https://msdn.microsoft.com/en-us/library/hh567368.aspx
>
> _______________________________________________
> Kde-frameworks-devel mailing list
> Kde-frameworks-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
>

You can also use:
#ifdef Q_COMPILER_RVALUE_REFS

It's used in many places in Qt already.

Aleix


More information about the Kde-frameworks-devel mailing list