C++11: Made VectorT::size() and VectorT::dim() constexpr.
This commit is contained in:
@@ -95,12 +95,12 @@ class VectorT {
|
|||||||
typedef VectorT<Scalar, DIM> vector_type;
|
typedef VectorT<Scalar, DIM> vector_type;
|
||||||
|
|
||||||
/// returns dimension of the vector (deprecated)
|
/// returns dimension of the vector (deprecated)
|
||||||
static inline int dim() {
|
static constexpr int dim() {
|
||||||
return DIM;
|
return DIM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// returns dimension of the vector
|
/// returns dimension of the vector
|
||||||
static inline size_t size() {
|
static constexpr size_t size() {
|
||||||
return DIM;
|
return DIM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user