Skip to content

Commit

Permalink
Remove type check for solaris. (dmlc#6610)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jan 15, 2021
1 parent d356b7a commit d132933
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/gbm/gblinear_model.cc
@@ -1,5 +1,5 @@
/*!
* Copyright 2019 by Contributors
* Copyright 2019-2021 by Contributors
*/
#include <utility>
#include <limits>
Expand All @@ -10,10 +10,6 @@ namespace xgboost {
namespace gbm {

void GBLinearModel::SaveModel(Json* p_out) const {
using WeightType = std::remove_reference<decltype(std::declval<decltype(weight)>().back())>::type;
using JsonFloat = Number::Float;
static_assert(std::is_same<WeightType, JsonFloat>::value,
"Weight type should be of the same type with JSON float");
auto& out = *p_out;

size_t const n_weights = weight.size();
Expand Down

0 comments on commit d132933

Please sign in to comment.