OpenTimelineIO
OpenTimelineIO copied to clipboard
Catching polymorphic exception by value
Bug Report
Incorrect Functionality
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp: In static member function ‘static opentime::v1_0::RationalTime opentime::v1_0::RationalTime::from_timecode(const string&, double, opentime::v1_0::ErrorStatus*)’:
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp:110:28: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
110 | } catch(std::exception e) {
| ^
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp: In static member function ‘static opentime::v1_0::RationalTime opentime::v1_0::RationalTime::from_time_string(const string&, double, opentime::v1_0::ErrorStatus*)’:
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp:178:28: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
178 | } catch(std::exception e) {
|
I don't get this with MSVC. Is this with clang or gcc?
It's a gcc warning, and legit, I've got no ranty opinion to go with it ;)