[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)
Thiago Macieira
thiago.macieira at intel.com
Wed Feb 4 18:55:36 CET 2015
On Wednesday 04 February 2015 12:47:42 Matthew Woehlke wrote:
> However, explicit defaulting is still interesting for the *default*
> constructor. (See
> https://msdn.microsoft.com/en-us/library/dn457344.aspx; apparently in
> MSVC at least there are advantages to an explicitly defaulted default
> constructor vs. an empty-bodied default constructor.)
A defaulted constructor can be trivial, whereas the empty-body one can't. That
has impact on whether the type itself is trivial and can be passed in
registers.
Which in turn means we can't leave this to the compiler, as it might break the
ABI.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list