@@ -91,12 +91,11 @@ namespace roboptim
9191 const DerivableFunction::vector_t & x);
9292
9393 template <typename T>
94- Function::size_type
95- computeConstraintsOutputSize (const T& solver)
94+ typename Tnlp<T>::size_type computeConstraintsOutputSize (const T& solver)
9695 {
9796 using namespace boost ;
9897
99- Function ::size_type result = 0 ;
98+ typename Tnlp<T> ::size_type result = 0 ;
10099 typedef typename T::problem_t ::constraints_t ::const_iterator citer_t ;
101100 for (citer_t it = solver.problem ().constraints ().begin ();
102101 it != solver.problem ().constraints ().end (); ++it)
@@ -147,8 +146,7 @@ namespace roboptim
147146 }
148147
149148 template <typename T>
150- Function::size_type
151- Tnlp<T>::constraintsOutputSize ()
149+ typename Tnlp<T>::size_type Tnlp<T>::constraintsOutputSize ()
152150 {
153151 return computeConstraintsOutputSize (solver_);
154152 }
@@ -253,7 +251,7 @@ namespace roboptim
253251 LinearityType type =
254252 ((*it)->template asType <GenericLinearFunction<traits_t > >()) ? TNLP ::LINEAR : TNLP ::NON_LINEAR ;
255253
256- for (Function:: size_type j = 0 ; j < (*it)->outputSize (); ++j)
254+ for (size_type j = 0 ; j < (*it)->outputSize (); ++j)
257255 const_types[idx++] = type;
258256 }
259257 return true ;
@@ -351,8 +349,7 @@ namespace roboptim
351349 Index m, Number* g)
352350 {
353351 using namespace boost ;
354- ROBOPTIM_DEBUG_ONLY (typename function_t ::size_type n_ =
355- static_cast <typename function_t ::size_type> (n));
352+ ROBOPTIM_DEBUG_ONLY (size_type n_ = static_cast <size_type> (n));
356353
357354 assert ((*costFunction_).inputSize () == n_);
358355 assert (constraintsOutputSize () == m);
@@ -369,7 +366,7 @@ namespace roboptim
369366
370367 typedef typename constraints_t ::const_iterator citer_t ;
371368
372- typename function_t :: size_type idx = 0 ;
369+ size_type idx = 0 ;
373370 for (citer_t it = constraints_.begin ();
374371 it != constraints_.end (); ++it)
375372 {
@@ -399,8 +396,7 @@ namespace roboptim
399396 {
400397 using namespace boost ;
401398
402- ROBOPTIM_DEBUG_ONLY (typename function_t ::size_type n_ =
403- static_cast <typename function_t ::size_type> (n));
399+ ROBOPTIM_DEBUG_ONLY (size_type n_ = static_cast <size_type> (n));
404400 assert ((*costFunction_).inputSize () == n_);
405401 assert (constraintsOutputSize () == m);
406402
@@ -442,7 +438,7 @@ namespace roboptim
442438
443439 typedef typename differentiableConstraints_t::const_iterator citer_t ;
444440
445- typename function_t :: size_type idx = 0 ;
441+ size_type idx = 0 ;
446442 int constraintId = 0 ;
447443 for (citer_t it = differentiableConstraints_.begin ();
448444 it != differentiableConstraints_.end (); ++it)
@@ -495,7 +491,7 @@ namespace roboptim
495491 bool, Index ROBOPTIM_DEBUG_ONLY(nele_hess), Index* iRow,
496492 Index* jCol, Number* values)
497493 {
498- ROBOPTIM_DEBUG_ONLY (function_t :: size_type n_ = static_cast <function_t :: size_type> (n));
494+ ROBOPTIM_DEBUG_ONLY (size_type n_ = static_cast <size_type> (n));
499495
500496 assert ((*costFunction_).inputSize () == n_);
501497 assert (constraintsOutputSize () == m);
0 commit comments