On Wed, 6 Dec 2023 19:59:25 GMT, Kevin Rushforth <[email protected]> wrote:
>> Yes. This is the copy-and-swap idiom, where the copy is made by using a >> pass-by-value parameter. > > I see. > > I did happen to spot this compiler warning while compiling: > > > .../VC/bin/x64/cl.exe /nologo /W3 /EHsc /c /DINLINE=__inline /DUNICODE > /D_UNICODE /DWIN32 /DIAL /D_LITTLE_ENDIAN /DWIN32_LEAN_AND_MEAN > /IC:/Users/kcr/dev/jdks/jdk-19.0.2/include /I.../jdk-19.0.2/include/win32 /O2 > /MD /DNDEBUG -Imodules\javafx.graphics\build\gensrc\headers\javafx.graphics > -Imodules\javafx.graphics\src\main\native-glass\win > /Fomodules\javafx.graphics\build\native\glass\win\RoActivationSupport.obj > modules\javafx.graphics\src\main\native-glass\win\RoActivationSupport.cpp > VC\include\utility(103) : warning C4717: 'std::swap<RoException,0>': > recursive on all control paths, function will cause runtime stack overflow > modules\javafx.graphics\src\main\native-glass\win\RoActivationSupport.cpp(233) > : warning C4717: 'RoException::operator=': recursive on all control paths, > function will cause runtime stack overflow > > > you can see that in your GHA build as well. I don't know for certain whether > this is a problem in practice or not, but it would be good to eliminate the > warning. I can fix this by swapping the `message_` fields directly, which doesn't change the logic of the copy-and-swap. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1014#discussion_r1417949026
