ros / class_loader

ROS-independent library for dynamic class (i.e. plugin) introspection and loading from runtime libraries
http://www.ros.org/wiki/class_loader
35 stars 95 forks source link

avoid including Poco headers globally #115

Closed kejxu closed 5 years ago

kejxu commented 5 years ago

use forward declaration to avoid including Poco headers globally

nuclearsandwich commented 5 years ago

@kejxu what issue does this change resolve? I'm not opposed to it as written but knowing why it needs to be done this way will preserve the change into the future.

kejxu commented 5 years ago

@kejxu what issue does this change resolve? I'm not opposed to it as written but knowing why it needs to be done this way will preserve the change into the future.

Thanks for the question! the Poco headers used by ros.melodic includes windows.h, which could very likely lead to namespace corruption. It'd be safer to only the headers in .cpp files.

also thanks for improvement @wjwwood! (and adding the link to the styling guidelines, we've always wondered if there should be a styling guideline to follow)