diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-12-26 21:43:40 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-29 06:16:13 +0000 |
commit | f2d1f3f1c7b9ab7e356b186d4187f46108d67b8c (patch) | |
tree | db4baca63465caa1dbabebbf71e9ac695680ecd8 /.gitattributes | |
parent | e65ffae850a7265c1d477957a5b24865b91ec3ad (diff) |
QColor: plaster API with Q_DECL_NOTHROW
This is mostly straight-forward, but some things are worth noting:
1. Yes, this is necessary. The noexcept operator looks for noexcept tagging,
not at the contents of the function to determine whether to return true.
The more conditionally-noexcept functions are used, the more important it
becomes that low-level classes are correctly marked noexcept. In that, it
is like constexpr.
2. In accordance with the rules governing noexcept specifications for the
standard library itself, the get*() functions, as well as any function
taking (but not returning) channel values as ints or qreals, or taking
QStrings are not marked as noexcept, since they have preconditions and
thus a narrow contract. Narrow-contract functions should not be noexcept.
All other functions have wide contracts (ie. no preconditions).
3. Any function returning QString can throw (bad_alloc).
Consequently, they, too, are not marked nothrow.
Change-Id: I023356ba1b9a4b057e613cd45380a89b222dc09d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions