[Interest] rvalue references on Mac OS X 10.10 and XCode 7

Thiago Macieira thiago.macieira at intel.com
Fri Sep 25 21:51:29 CEST 2015


On Friday 25 September 2015 20:55:03 Philippe wrote:
> Why do you say so?
> 
> Qt defines Q_COMPILER_RVALUE_REFS
> and I don't see this define dependent on the presence of libstdc++

Sven is right. From qcompilerdetection.h:

# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && 
defined(__GNUC_LIBSTD__) \
    && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
// Apple has not updated libstdc++ since 2007, which means it does not have
// <initializer_list> or std::move. Let's disable these features
#  undef Q_COMPILER_INITIALIZER_LISTS
#  undef Q_COMPILER_RVALUE_REFS
#  undef Q_COMPILER_REF_QUALIFIERS
// Also disable <atomic>, since it's clearly not there
#  undef Q_COMPILER_ATOMICS
# endif

In other words: stop using libstdc++ on OS X.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list