Closed peria closed 8 years ago
Oops. Thanks for the quick fix!
It is difficult to make a test to verify this situation in a reliable way, but you can check it as follows.
empty.cc
which just includes toml.h
under src/
src/parse_stdin.cc
. I confirmed it with VC++14 (2015)> cl src/parse_stdin.cc src/empty.cc /Iinclude
I'll write a link test to prevent this.
This template and its specializations can be instantiated in each object file. In such a case, we cannot link multiple object files which use toml.h. Without
inline
, it depends on compilers and its optimization settings whether this templates are in-line expanded.To help compilers to expand it and to avoid link conflicts, this CL adds
inline
attributes to the template.