Commit e734d1f6 authored by davidkep's avatar davidkep

fix non-standard usage of constexpr and static_assert

parent abc14099
......@@ -20,7 +20,7 @@ namespace nsoptim {
//! The slope coefficients must be either of type `arma::vec` or `arma::sp_vec`.
template <class T>
class RegressionCoefficients {
static_assert(std::is_same<T, arma::vec>() || std::is_same<T, arma::sp_vec>(),
static_assert(std::is_same<T, arma::vec>::value || std::is_same<T, arma::sp_vec>::value,
"T must be a (sparse) vector.");
public:
......
......@@ -130,7 +130,7 @@ class LassoPenalty : public PenaltyFunction, public ConvexFunction<LassoPenalty>
return LassoPenalty(*this);
}
constexpr double alpha() const noexcept {
double alpha() const noexcept {
return 1.;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment