Configuru
Configuru copied to clipboard
Move implementation into cpp
Addresses issue #9
When Configuru is included in separate translation units, it can result in LNK2005 errors on MSVC. GCC seems to handle this fine, but it is still a violation of the One Definition Rule, where it appears Configuru is still built into multiple translation units.
This commit is similar to that done on Loguru two years ago.
I have shown this works successfully in two different projects that utilize Configuru in separate units. One uses two different configuration files. The other uses Configuru for a config file and then some simple JSON formatting for a web API.
I don't use Boost and really didn't feel like messing with getting that to work. So I was able to build the test suite (using std::experimental::filesystem instead of boost::filesystem) and confirm the tests still all pass. I've not included this in the merge request, but if interested the code that works with std::experimental::filesystem can be seen on the separate_into_hpp_and_cpp branch of psyklopz/Configuru.
I will make these changes. I'm a little swamped at the moment, so it probably won't be until next week.