Closed IanTheEngineer closed 6 years ago
... or just move the file to src/ to avoid installing it
I prefer this as it facilitates later reuse in another context.
Hi @IanTheEngineer, I'm wondering why you want to get rid of boost::trim at all? I totally agree that it makes sense to switch from boost::pointers to std::pointers. However, why should we not re-use other boost utility functions? I don't see the point of inserting header-only code (like trim) all around, instead of using, well-maintained boost code, also header-only. @v4hn, @davetcoleman What should be our policy regarding boost code?
@rhaschke I don't have a particularly strong opinion on using boost::trim
or not. The goal was just to use the tools afforded by C++11 where possible. These lambdas are pretty straightforward replacements for trim, but if we decide to leave boost as a build dependency just for trim, that's entirely acceptable.
@rhaschke if things looks good, I can squash everything down into one commit.
I agree boost
is preferred over custom code, but should be replaced where possible by std
Thanks @IanTheEngineer !
I think everyone agrees here already. If Boost offers functions that simplify our code base, then feel free to use them. There is no particular reason to remove them either, unless the standard offers equivalent solutions.
It may make sense to branch to
melodic-devel
prior to adding this commit.Replacedboost::trim
with C++11 lambda implementation of string trimmingboost::shared_ptr
withstd::shared_ptr
These changes were tested with all of the catkin tests provided, and passed.