mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Suppress GCC warning in TreeEnsembleAggregator (#22062)
### Description When building with GCC 14.2.1, I got the following warning: onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h:329:59: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor] Remove template parameters from the constructor: The constructor TreeAggregatorMax<InputType, ThresholdType, OutputType> has been simplified to TreeAggregatorMax, because the compiler already knows the template parameters from the class definition. ### Motivation and Context Fix the build issue Signed-off-by: Clément Péron <peron.clem@gmail.com>
This commit is contained in:
parent
84f73327f5
commit
10883d7997
1 changed files with 4 additions and 5 deletions
|
|
@ -328,11 +328,10 @@ class TreeAggregatorMin : public TreeAggregator<InputType, ThresholdType, Output
|
|||
template <typename InputType, typename ThresholdType, typename OutputType>
|
||||
class TreeAggregatorMax : public TreeAggregator<InputType, ThresholdType, OutputType> {
|
||||
public:
|
||||
TreeAggregatorMax<InputType, ThresholdType, OutputType>(size_t n_trees,
|
||||
const int64_t& n_targets_or_classes,
|
||||
POST_EVAL_TRANSFORM post_transform,
|
||||
const std::vector<ThresholdType>& base_values) : TreeAggregator<InputType, ThresholdType, OutputType>(n_trees, n_targets_or_classes,
|
||||
post_transform, base_values) {}
|
||||
TreeAggregatorMax(size_t n_trees,
|
||||
const int64_t& n_targets_or_classes,
|
||||
POST_EVAL_TRANSFORM post_transform,
|
||||
const std::vector<ThresholdType>& base_values) : TreeAggregator<InputType, ThresholdType, OutputType>(n_trees, n_targets_or_classes, post_transform, base_values) {}
|
||||
|
||||
// 1 output
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue