As it turns out, using the functional-notation form conversion with *parentheses* will fall back on a C-style (wild, re-interpret) cast when the target type is *not* a class. As in the case in question here, where it is a const& to a class. To the contrary, using *curly braces* will always attempt to go through a constructor, and thus fail as expected, when there is no conversion path available. I wasn't aware of that pitfall. I noticed it since the recently introduced class TimelineGui lacked a conversion operator to BareEntryID const& and just happily used the TimelineGui object itself and did a reinterpret_cast into BareEntryID |
||
|---|---|---|
| .. | ||
| clang-static-init-1.cpp | ||
| clang-static-init-2.cpp | ||
| clang-static-init.hpp | ||
| crash_gdb_jessie-2015-08.sh | ||
| DIR_INFO | ||
| gtk-canvas-experiment.cpp | ||
| gtk-canvas-experiment.hpp | ||
| gtk-canvas-main.cpp | ||
| SConscript | ||
| try.cpp | ||