Skip to content

Commit

Permalink
fixing compilation issue: value usage of fwd declared struct
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulXiCao committed Nov 7, 2023
1 parent 62c0f14 commit 0cdb45d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test-suite/optimizers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ using std::cos;

namespace {

struct NamedOptimizationMethod;
struct NamedOptimizationMethod {
ext::shared_ptr<OptimizationMethod> optimizationMethod;
std::string name;
};

std::vector<ext::shared_ptr<CostFunction> > costFunctions_;
std::vector<ext::shared_ptr<Constraint> > constraints_;
Expand Down Expand Up @@ -139,11 +142,6 @@ namespace {
}
}

struct NamedOptimizationMethod {
ext::shared_ptr<OptimizationMethod> optimizationMethod;
std::string name;
};


ext::shared_ptr<OptimizationMethod> makeOptimizationMethod(
OptimizationMethodType optimizationMethodType,
Expand Down

0 comments on commit 0cdb45d

Please sign in to comment.