missing construct List from UList
seems to be handled by this one:
template<class T2>
explicit List(const List<T2>&);
only noticed when I tried to inherit constructors from List in a derived class.
seems to be handled by this one:
template<class T2>
explicit List(const List<T2>&);
only noticed when I tried to inherit constructors from List in a derived class.
IMO the constructor from dissimilar types is rather dangerous:
//- Copy constructor from list containing another type.
template<class T2>
explicit List(const List<T2>&);
mentioned in commit a8c40cc8c46af8f4fc19b0788fb2b2a7cb5db09b
Use createList
factory method instead. Eg,
auto scalars = scalarList::createList
(
labels,
[](const label& val){ return 1.5*val; }
);
closed