diff --git a/lion/foundation/types.h b/lion/foundation/types.h index 1f3f1b7..3a141e5 100644 --- a/lion/foundation/types.h +++ b/lion/foundation/types.h @@ -10,4 +10,11 @@ using std::size_t; using std::max; using std::min; + +#ifdef _MSC_VER +#define windows_local_constexpr_auto static constexpr auto +#else +#define windows_local_constexpr_auto constexpr auto +#endif + #endif diff --git a/lion/foundation/utils.hpp b/lion/foundation/utils.hpp index 7719017..ff4f9aa 100644 --- a/lion/foundation/utils.hpp +++ b/lion/foundation/utils.hpp @@ -798,6 +798,11 @@ std::vector grid_vectors2points_rowmaj(const ContainerOfGridVectorsT // 0, 4, 6, // 1, 4, 6 }". // + // Note that the "rows" of points are ordered in + // column-major order w.r.t. to the grid (i.e., + // first dimension advances first, then the second, + // etc). + // const auto num_grid_vectors = grid_vectors.size(); diff --git a/lion/math/polynomial.h b/lion/math/polynomial.h index 60a541b..bf2d302 100644 --- a/lion/math/polynomial.h +++ b/lion/math/polynomial.h @@ -517,7 +517,7 @@ inline Polynomial Polynomial::derivative() const { coeffs[n] = std::vector(_n[n],T()); for (size_t i = 0; i <= _n[n]; ++i) - for (int j = i-1 ; j >= 0; j -= 2) + for (std::ptrdiff_t j = static_cast(i) - 1 ; j >= 0; j -= 2) coeffs[n][j] += _coeffs[n][i]*(2.0*(j+1.0)-1.0); for (size_t i = 0; i < _n[n]; ++i)