fixes MSVC Community 2015 ICE

The default constructors are now used as template specializations by
postponing them below the template definition
This commit is contained in:
Martin Schultz
2016-05-24 15:06:32 +02:00
parent d3c38be0dc
commit 4b8f1bf667

View File

@@ -112,16 +112,6 @@ class VectorT {
//-------------------------------------------------------------- constructors
/// default constructor creates uninitialized values.
constexpr VectorT() {}
/**
* Creates a vector with all components set to v.
*/
explicit VectorT(const Scalar &v) {
vectorize(v);
}
template<typename ... T,
typename = typename std::enable_if<sizeof...(T) == DIM>::type,
typename = typename std::enable_if<
@@ -133,6 +123,16 @@ class VectorT {
"Not all components are convertible to Scalar.");
}
/// default constructor creates uninitialized values.
constexpr VectorT() {}
/**
* Creates a vector with all components set to v.
*/
explicit VectorT(const Scalar &v) {
vectorize(v);
}
VectorT(const VectorT &rhs) = default;
VectorT(VectorT &&rhs) = default;
VectorT &operator=(const VectorT &rhs) = default;