-
- Downloads
[A/U] Store value instead of reference.
Since at least gcc-9.1 the original code didn't compile any longer with error message: computeSurfaceNodeIDsInPolygonalRegion.cpp:147:48: error: converting to ‘const GeoLib::Polygon’ from initializer list would use explicit constructor ‘GeoLib::Polygon::Polygon(const GeoLib::Polyline&, bool)’ 147 | GeoLib::Polygon const& polygon{*plys[j]}; | ^ From reference_initialization page of cppreference.com: Lifetime of a temporary: ... - a temporary bound to a reference member in a constructor initializer list persists only until the constructor exits, not as long as the object exists. (note: such initialization is ill-formed as of DR 1696).
Loading
Please register or sign in to comment