diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-12-28 06:06:21 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-12-29 23:42:55 (GMT) |
commit | ba981bb2ed170a6e59614657b04b204f7db4893d (patch) | |
tree | 45b825c7082262e495f25727e4d32d1ce558e3b4 /Help/guide/tutorial/Step3/MathFunctions/MathFunctions.h | |
parent | a1b71112d10b371610ef03b908ce9f2ab8eaeaf9 (diff) | |
download | CMake-ba981bb2ed170a6e59614657b04b204f7db4893d.zip CMake-ba981bb2ed170a6e59614657b04b204f7db4893d.tar.gz CMake-ba981bb2ed170a6e59614657b04b204f7db4893d.tar.bz2 |
TryCompileCode(): Prevent warning on return value
Some newer compilers warn in situations where the returned local
variable could be movable, but a C++11 defect meant older compilers
may still return a copy when a type conversion is involved. Adding
the suggested std::move prevents that warning on that compiler, but
creates a new warning on others. Constructing the actual return type
explicitly with the suggested std::move on the constructor argument
keeps both sets of compilers happy.
Diffstat (limited to 'Help/guide/tutorial/Step3/MathFunctions/MathFunctions.h')
0 files changed, 0 insertions, 0 deletions