Closed traversaro closed 6 years ago
By the way, given that you target C++17, have you considered using std::variant
for that class?
Thanks for spotting!
By the way, given that you target C++17, have you considered using std::variant for that class?
Not really, I'm not familiar with that type
By the way, given that you target C++17, have you considered using std::variant for that class?
Not really, I'm not familiar with that type
However, std::optional might be an option. But, since the boost dependency is already in place it does not really make much of a difference either way.
However, std::optional might be an option. But, since the boost dependency is already in place it does not really make much of a difference either way.
It depends, having a build time dependency is quite different from having a dependency on the compiled library. Besides using vcpkg
, it is quite common to distribute libraries in windows as installers or even simple .zip
archives that contain the headers of the library and the compiled library. If you are able to avoid including boost headers in public headers (for example using the pimpl pattern) and you statically link boost, you can distribute the library binary and headers on their own, otherwise you will always need to distribute the library together with the relevant boost headers.
Without this fix, I had problem compiling on Ubuntu 18.04