@@ -32,10 +32,6 @@ template <typename _Scalar> struct StageModelTpl {
3232 using PolyConstraintSet = polymorphic<ConstraintSetTpl<Scalar>>;
3333 using Cost = CostAbstractTpl<Scalar>;
3434 using PolyCost = polymorphic<Cost>;
35- #pragma GCC diagnostic push
36- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
37- using StageConstraint = StageConstraintTpl<Scalar>;
38- #pragma GCC diagnostic pop
3935 using Data = StageDataTpl<Scalar>;
4036
4137 // / State space for the current state \f$x_k\f$.
@@ -105,12 +101,6 @@ template <typename _Scalar> struct StageModelTpl {
105101 int numDual () const { return ndx2 () + nc (); }
106102
107103 // / @brief Add a constraint to the stage.
108- template <typename Cstr, typename = std::enable_if_t <std::is_same_v<
109- std::decay_t <Cstr>, StageConstraint>>>
110- ALIGATOR_DEPRECATED void addConstraint (Cstr &&cstr);
111-
112- // / @copybrief addConstraint().
113- // / @details Adds a constraint by allocating a new StageConstraintTpl.
114104 void addConstraint (const PolyFunction &func,
115105 const PolyConstraintSet &cstr_set);
116106
@@ -135,18 +125,6 @@ template <typename _Scalar> struct StageModelTpl {
135125 virtual shared_ptr<Data> createData () const ;
136126};
137127
138- template <typename Scalar>
139- template <typename Cstr, typename >
140- void StageModelTpl<Scalar>::addConstraint(Cstr &&cstr) {
141- const int c_nu = cstr.func ->nu ;
142- if (c_nu != this ->nu ()) {
143- ALIGATOR_RUNTIME_ERROR (
144- " Function has the wrong dimension for u: got {:d}, expected {:d}" , c_nu,
145- this ->nu ());
146- }
147- constraints_.pushBack (std::forward<Cstr>(cstr));
148- }
149-
150128#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
151129extern template struct StageModelTpl <context::Scalar>;
152130#endif
0 commit comments