These are chat archives for fmtlib/fmt

21st
Mar 2018
Victor Zverovich
@vitaut
Mar 21 2018 13:57
Variadic templates should normally defined in header files. You could try explicitly instantiate them in a .cpp file, but this will have to be done for every combination of argument types which is problematic.
But you can use type erasure and only define small inline variadic wrappers in the header file while placing the definition of functions taking format_args and do the actual work in the .cpp files.
Here's an example: https://godbolt.org/g/UkZBwg
Daniel Lim Wee Soong
@daniellimws
Mar 21 2018 15:09
thanks a lot!