Open LeonMatthesKDAB opened 7 months ago
Note this is also something that if cxx-qt-lib is split out could go into cxx-qt or a -common thing later :thinking:
See comments in #840, consider having an up and downcast helper
template<typename Base, typename T>
Base & upcast(T& t)
{
// Maybe add some static_assert that Base is indeed base class of T
return static_cast<Base&>(t);
}
To complete our list of templated constructors in
cxx-qt-lib/common.h
.We probably want to have at least:
construct
make_unique
(added in #779 - to be released with 0.7)make_shared
new
/new_ptr
(contributed in #905 , thanks to @knoxfighter)cxx-qt
rather thancxx-qt-lib