[Development] Proposal for Qt 5.10 platforms and configurations changes
Thiago Macieira
thiago.macieira at intel.com
Sat Apr 29 22:31:23 CEST 2017
On Friday, 28 April 2017 12:50:41 -03 Mat Sutcliffe wrote:
> tldr: MSVC expects to see linker symbols for inline member functions of
> exported classes. When such a function is defined within #ifdef
> Q_COMPILER_foo (being a macro that is defined for 2017 but not 2015) this
> could mean linker errors. Unknown if this effect has actually been observed
> or is merely theoretical.
Thanks Mat.
If this is the only issue, then it's only a potential issue that will not
affect us. There's exactly one Q_COMPILER_foo macro that is in 2017 that isn't
in 2015:
Q_COMPILER_CONSTEXPR
And the totality of its use in public headers, aside from the definition in
qcompilerdetection.h, is:
- qtbase/src/corelib/thread/qbasicatomic.h
#elif defined(Q_COMPILER_ATOMICS) && (defined(Q_COMPILER_CONSTEXPR) ||
defined(Q_OS_QNX))
# include <QtCore/qatomic_cxx11.h>
// We only support one fallback: MSVC, because even on version 2015, it lacks
full constexpr support
#elif defined(Q_CC_MSVC)
# include <QtCore/qatomic_msvc.h>
[...]
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) &&
defined(Q_COMPILER_DELETE_MEMBERS)
# define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS
#endif
- qtbase/src/corelib/arch/qatomic_cxx11.h
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) &&
defined(Q_COMPILER_DELETE_MEMBERS)
# define Q_BASIC_ATOMIC_INITIALIZER(a) { a }
#else
# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) }
#endif
- qtbase/src/corelib/global/qnamespace.h
#if defined(Q_COMPILER_CLASS_ENUM) && defined(Q_COMPILER_CONSTEXPR)
enum class Initialization {
Uninitialized
};
static constexpr Q_DECL_UNUSED Initialization Uninitialized =
Initialization::Uninitialized;
#else
enum Initialization {
Uninitialized
};
#endif
None of those affect an exported class.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list