3#include "ConstExplicitlySharedDataPointer.h"
8 template <
typename _T2_,
typename _T_>
requires details::base_of<_T2_, _T_>
11 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
13 #pragma GCC diagnostic error "-Wstrict-aliasing"
15 template <
typename _T_>
20 template <
typename _T2_,
typename _T_>
requires details::base_of<typename _T2_::Type, _T_>
21 QList<_T2_> listCast(
const QList<ConstExplicitlySharedDataPointer<_T_>>& _list)
23 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
24 return *
reinterpret_cast<const QList<_T2_>*
>(&_list);
25 #pragma GCC diagnostic error "-Wstrict-aliasing"
27 template <typename _T2_, typename _T_, typename std::enable_if<std::is_base_of<_T2_, _T_>::value,
int>::type = 0>
31 for(
const ConstExplicitlySharedDataPointer<_T_>& t : _list)
33 transitions.append(t.data());
37 template <
typename _T2_,
typename _T_>
requires (not details::base_of<_T2_, _T_>) and std::convertible_to<_T_, _T2_> and (not std::same_as<_T_, _T2_>)
41 for(
const _T_& t : _list)
43 transitions.append(t);
47 template <
typename _T_>
50 QVector<_T_> transitions;
51 std::copy(_list.begin(), _list.end(), std::back_inserter(transitions));