diff --git a/common/string_util.h b/common/string_util.h index 09da9088c..7936eaec5 100644 --- a/common/string_util.h +++ b/common/string_util.h @@ -22,6 +22,11 @@ #include #include +#ifndef _WIN32 +// this doesn't appear to affect linux-based systems..need feedback for _WIN64 +#include +#endif + #include "types.h" //std::string based @@ -52,7 +57,7 @@ std::string implode(const std::string &glue, const std::pair &encaps return output; } -// this requires that #include be included in whatever code file the invocation is made from +// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) template std::vector join_pair(const std::string &glue, const std::pair &encapsulation, const std::vector> &src) { @@ -64,10 +69,7 @@ std::vector join_pair(const std::string &glue, const std::pair &src_iter : src) { output.push_back( - // There are issues with including in a header file that result in compile - // failure. I'm not sure if this applies only within the same project or across projects. - // Since templates act similar to macros in regards to initialization, this definition - // should be safe so long as the '#include' rule above is observed. + fmt::format( "{}{}{}{}{}{}{}", encapsulation.first, @@ -84,7 +86,7 @@ std::vector join_pair(const std::string &glue, const std::pair be included in whatever code file the invocation is made from +// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) template std::vector join_tuple(const std::string &glue, const std::pair &encapsulation, const std::vector> &src) { @@ -97,7 +99,7 @@ std::vector join_tuple(const std::string &glue, const std::pair &src_iter : src) { output.push_back( - // note: see join_pair(...) + fmt::format( "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", encapsulation.first,