Skip to content

Commit accbc8d

Browse files
committed
protect code from swig
1 parent e600bc3 commit accbc8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ortools/linear_solver/wrappers/model_builder_helper.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
namespace operations_research {
3636
namespace mb {
3737

38+
#if !defined(SWIG)
3839
// Base implementation of linear expressions.
3940

4041
class BoundedLinearExpression;
@@ -348,6 +349,8 @@ class BoundedLinearExpression {
348349
double upper_bound_;
349350
};
350351

352+
#endif // !defined(SWIG)
353+
351354
// The arguments of the functions defined below must follow these rules
352355
// to be wrapped by SWIG correctly:
353356
// 1) Their types must include the full operations_research::
@@ -509,7 +512,9 @@ class ModelSolverHelper {
509512
double objective_value() const;
510513
double best_objective_bound() const;
511514
double variable_value(int var_index) const;
515+
#if !defined(SWIG)
512516
double expression_value(std::shared_ptr<LinearExpr> expr) const;
517+
#endif // !defined(SWIG)
513518
double reduced_cost(int var_index) const;
514519
double dual_value(int ct_index) const;
515520
double activity(int ct_index);

0 commit comments

Comments
 (0)