Language
C++
Compiler
gcc 5.4.0
Options
Warnings
Boost 1.67.0
C++11
no pedantic
Raw compiler options
-DDEBUG
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/gcc-5.4.0/include -std=c++11 -DDEBUG
prog.cc: In instantiation of 'std::__cxx11::string xprintf_impl(boost::format&, tFirst, tParams ...) [with tFirst = double; tParams = {}; std::__cxx11::string = std::__cxx11::basic_string<char>; boost::format = boost::basic_format<char>]':
prog.cc:10:21: required from 'std::__cxx11::string xprintf_impl(boost::format&, tFirst, tParams ...) [with tFirst = const char*; tParams = {double}; std::__cxx11::string = std::__cxx11::basic_string<char>; boost::format = boost::basic_format<char>]'
prog.cc:16:21: required from 'std::__cxx11::string xprintf(const string&, tParams ...) [with tParams = {const char*, double}; std::__cxx11::string = std::__cxx11::basic_string<char>]'
prog.cc:31:57: required from here
prog.cc:10:21: error: no matching function for call to 'xprintf_impl(boost::basic_format<char>&)'
return xprintf_impl(iFormat % iFirst, iParams...);
^
prog.cc:3:20: note: candidate: std::__cxx11::string xprintf_impl(std::__cxx11::string)
inline std::string xprintf_impl(std::string iFormat)
^
prog.cc:3:20: note: no known conversion for argument 1 from 'boost::basic_format<char>' to 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}'
prog.cc:8:20: note: candidate: template<class tFirst, class ... tParams> std::__cxx11::string xprintf_impl(boost::format&, tFirst, tParams ...)
inline std::string xprintf_impl(boost::format& iFormat, tFirst iFirst, tParams... iParams)
^
prog.cc:8:20: note: template argument deduction/substitution failed:
prog.cc:10:21: note: candidate expects at least 2 arguments, 1 provided
return xprintf_impl(iFormat % iFirst, iParams...);
^
Exit Code:
1