Go to file
Giuseppe D'Angelo a97cda8b8b QMath: make the math-related functions templates
This way we can take and return more datatypes than qreal,
just piggy-backing on the std:: functions (which take any
integral and any fp datatype).

This makes these functions pure ADL enablers (like qSwap).
A type (hi, QAngle!) that wants to have math related functions
simply needs those defined in its own namespace using the
"standard" names (sin, cos, etc.); and we'll find them
using the q-prefixed function.

qCeil and qFloor signatures however still return int
to avoid too much breakage.

The FP-related functions (qIsInf, etc.) have been left
alone. Those are "special"; a lot of care is in qnumeric
because some implementations define them as macros, which
blocks any possibility of user-defined overloads found via
ADL.

[ChangeLog][QtCore][QtMath] The math-related functions
(such as qSin, qCos, qPow and so on) can now take an
arbitrary parameter rather than just qreal. They will do
a ADL-enabled call to the respective free function, using
the functions in namespace std as a fallback. Moreover,
they will now return whatever datatype is returned by the
free function (e.g. long double if the call is placed on
a long double).

Change-Id: I111084eda52556663802e65a85e082187c2a6861
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-17 17:56:48 +02:00
bin CMake: Use custom install script to support Ninja Multi-Config builds 2020-05-19 10:16:11 +02:00
cmake CMake: Fix .prl generation and installation for plugins 2020-06-17 15:13:44 +02:00
coin CMake: Use the same generator when building other repositories 2020-05-19 10:16:16 +02:00
config.tests CMake: Skip regeneration of manual compile test project 2020-04-09 11:26:46 +02:00
dist Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
doc Doc: Update global documentation config for Qt 6 2020-06-08 13:41:07 +02:00
examples Introduce QInputDevice hierarchy; replace QTouchDevice 2020-06-16 22:06:56 +02:00
lib
mkspecs Android: fix regexp error in android_deployment_settings.prf 2020-06-16 15:16:36 +00:00
qmake CMake: Fix usage of gc_binaries feature 2020-06-12 22:34:12 +02:00
src QMath: make the math-related functions templates 2020-06-17 17:56:48 +02:00
tests Update QTabletEvent device_information manual test 2020-06-17 09:12:20 +02:00
util CMake: Improve sanitizer detection 2020-06-15 18:41:35 +02:00
.cmake.conf pro2cmake.py: Generate .cmake.conf files for versioning 2020-04-30 17:44:03 +00:00
.gitattributes
.gitignore Remove winrt 2020-06-06 20:25:49 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt CMake: Protect against Qt toolchain file recursive inclusion 2020-06-04 23:21:27 +02:00
config_help.txt Remove winrt 2020-06-06 20:25:49 +02:00
configure Compile QRegularExpression into qmake 2020-05-05 18:41:20 +02:00
configure.bat Don't compile qmake in c++11 mode 2020-02-03 17:43:30 +01:00
configure.cmake CMake: Improve sanitizer detection 2020-06-15 18:41:35 +02:00
configure.json Remove winrt 2020-06-06 20:25:49 +02:00
configure.pri Remove winrt 2020-06-06 20:25:49 +02:00
dependencies.yaml Re-add dependencies.yaml so repos outside qt5 can be built with Coin 2019-09-19 17:07:36 +00:00
header.BSD
header.COMM
header.FDL
header.GPL
header.GPL-EXCEPT
header.LGPL
header.LGPL3
header.LGPL3-COMM
header.LGPL-NOGPL2
header.LGPL-ONLY
header.MIT
INSTALL
LICENSE.FDL
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.LGPLv3
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro
sync.profile Remove the openglextensions module 2020-06-10 09:35:04 +02:00