Skip to content
Snippets Groups Projects
Commit f774cbf3 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[la.common.vector] extend VectorAbstraction

parent 689cbf92
No related branches found
No related tags found
No related merge requests found
......@@ -650,12 +650,20 @@ struct VectorAbstractionBase
{
static const bool is_vector = LA::is_vector<VectorImp>::value;
static const bool has_static_size = false;
static const size_t static_size = std::numeric_limits<size_t>::max();
typedef typename std::conditional<is_vector, VectorImp, void>::type VectorType;
typedef typename std::conditional<is_vector, typename VectorImp::ScalarType, void>::type ScalarType;
typedef ScalarType S;
static typename std::enable_if<is_vector, VectorType>::type create(const size_t sz,
const ScalarType& val = ScalarType(0))
static inline typename std::enable_if<is_vector, VectorType>::type create(const size_t sz)
{
return VectorType(sz);
}
static inline typename std::enable_if<is_vector, VectorType>::type create(const size_t sz, const ScalarType& val)
{
return VectorType(sz, val);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment