summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step5/MathFunctions
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2022-12-28 06:06:21 (GMT)
committerCraig Scott <craig.scott@crascit.com>2022-12-29 23:42:55 (GMT)
commitba981bb2ed170a6e59614657b04b204f7db4893d (patch)
tree45b825c7082262e495f25727e4d32d1ce558e3b4 /Help/guide/tutorial/Step5/MathFunctions
parenta1b71112d10b371610ef03b908ce9f2ab8eaeaf9 (diff)
downloadCMake-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/Step5/MathFunctions')
0 files changed, 0 insertions, 0 deletions