20 class Collection :
public std::list<std::shared_ptr<T>>
27 template<
typename... T_>
28 requires ((!std::is_same_v<Collection<T>,T_>) && ...)
29 Collection(
const T_&... x)
31 (this->push_back(x), ...);
34 Collection(std::initializer_list<std::shared_ptr<T>>
init)
35 : std::list<std::shared_ptr<T>>(
init)
38 Collection(
const Collection<T>& c)
39 : std::list<std::shared_ptr<T>>()
41 for(
const auto& ci : c)
44 this->push_back(std::dynamic_pointer_cast<T>(ci->copy()));
49 requires std::is_base_of_v<T,T_>
50 void push_back(
const T_& x)
52 this->push_back(std::make_shared<T_>(x));
56 requires std::is_base_of_v<T,T_>
57 void push_back(
const std::shared_ptr<T_>& x)
59 this->std::list<std::shared_ptr<T>>::push_back(x);
auto & init()
Initializes all elements of the matrix with default intervals.
Definition codac2_Matrix_addons_IntervalMatrixBase.h:113
Definition codac2_OctaSym.h:21