You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to know if it is possible to change the signature or to add another iterator() function in gatb::core::tools::dp::Iterator class. I guess this class is used a lot when programming in GATB, but we can't use it with lambda expressions. Right now, this function is defined as:
template <typename Functor> void iterate (/* R: removed const for convenience */ /*const*/ Functor& f) { for (first(); !isDone(); next()) { f (item()); } }
As the parameter is not const anymore, it is not possible to use this function with lambda expressions, which is convenient for those using c++11. For those using versions below c++11, however, the function seems more convenient as it is now...
This is not a big deal though...
The text was updated successfully, but these errors were encountered:
seems that the functor could simply be made const safely in the current code. so, please checkout the current master branch, the fix will appear in the next release (1.2.3)
Hello!
I'd like to know if it is possible to change the signature or to add another iterator() function in gatb::core::tools::dp::Iterator class. I guess this class is used a lot when programming in GATB, but we can't use it with lambda expressions. Right now, this function is defined as:
template <typename Functor> void iterate (/* R: removed const for convenience */ /*const*/ Functor& f) { for (first(); !isDone(); next()) { f (item()); } }
As the parameter is not const anymore, it is not possible to use this function with lambda expressions, which is convenient for those using c++11. For those using versions below c++11, however, the function seems more convenient as it is now...
This is not a big deal though...
The text was updated successfully, but these errors were encountered: