From 0c5b6c6bfad1ee5b88be597954f8afa72c3f271c Mon Sep 17 00:00:00 2001 From: Sebastian Maisch Date: Wed, 26 Jul 2017 18:34:34 +0200 Subject: [PATCH] Fixed build for VS2017. --- flens/lapack/la/ilaenv.tcc | 2 +- flens/vectortypes/impl/densevector.h | 4 +++- flens/vectortypes/impl/densevector.tcc | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/flens/lapack/la/ilaenv.tcc b/flens/lapack/la/ilaenv.tcc index b05739d2..ffdcc309 100644 --- a/flens/lapack/la/ilaenv.tcc +++ b/flens/lapack/la/ilaenv.tcc @@ -376,7 +376,7 @@ ilaenv_impl(int spec, const char *name, const char *opts, } } } - result = nx/1.5; + result = static_cast(static_cast(nx)/1.5); break; // // DEPRECATED: number of shifts used in the nonsymmetric eigenvalue diff --git a/flens/vectortypes/impl/densevector.h b/flens/vectortypes/impl/densevector.h index 7a193c0b..7f667ac2 100644 --- a/flens/vectortypes/impl/densevector.h +++ b/flens/vectortypes/impl/densevector.h @@ -69,6 +69,8 @@ class DenseVector typedef DenseVector View; typedef DenseVector NoView; + static const IndexType defaultIndexBase = Engine::defaultIndexBase; + private: typedef DenseVector DV; @@ -229,7 +231,7 @@ class DenseVector bool resize(IndexType length, - IndexType firstIndex = Engine::defaultIndexBase, + IndexType firstIndex = defaultIndexBase, const ElementType &value = ElementType()); bool diff --git a/flens/vectortypes/impl/densevector.tcc b/flens/vectortypes/impl/densevector.tcc index 3fcd3a7a..f78245b4 100644 --- a/flens/vectortypes/impl/densevector.tcc +++ b/flens/vectortypes/impl/densevector.tcc @@ -160,7 +160,7 @@ DenseVector::operator-=(const Vector &rhs) template template -typename RestrictTo::value, +typename RestrictTo::Engine::ElementType>::value, DenseVector >::Type & DenseVector::operator+=(const T &alpha) { @@ -172,7 +172,7 @@ DenseVector::operator+=(const T &alpha) template template -typename RestrictTo::value, +typename RestrictTo::Engine::ElementType>::value, DenseVector >::Type & DenseVector::operator-=(const T &alpha) { @@ -184,7 +184,7 @@ DenseVector::operator-=(const T &alpha) template template -typename RestrictTo::value, +typename RestrictTo::Engine::ElementType>::value, DenseVector >::Type & DenseVector::operator*=(const T &alpha) { @@ -194,7 +194,7 @@ DenseVector::operator*=(const T &alpha) template template -typename RestrictTo::value, +typename RestrictTo::Engine::ElementType>::value, DenseVector >::Type & DenseVector::operator/=(const T &alpha) {