61 std::logic_error(reason)
84 std::string
format(
const std::string& fmt,
85 const ValueWrapper a);
107 std::string
format(
const std::string& fmt,
108 const ValueWrapper a,
const ValueWrapper b);
132 std::string
format(
const std::string& fmt,
133 const ValueWrapper a,
const ValueWrapper b,
134 const ValueWrapper c);
160 std::string
format(
const std::string& fmt,
161 const ValueWrapper a,
const ValueWrapper b,
162 const ValueWrapper c,
const ValueWrapper d);
190 std::string
format(
const std::string& fmt,
191 const ValueWrapper a,
const ValueWrapper b,
192 const ValueWrapper c,
const ValueWrapper d,
193 const ValueWrapper e);
223 std::string
format(
const std::string& fmt,
224 const ValueWrapper a,
const ValueWrapper b,
225 const ValueWrapper c,
const ValueWrapper d,
226 const ValueWrapper e,
const ValueWrapper f);
258 std::string
format(
const std::string& fmt,
259 const ValueWrapper a,
const ValueWrapper b,
260 const ValueWrapper c,
const ValueWrapper d,
261 const ValueWrapper e,
const ValueWrapper f,
262 const ValueWrapper g);
296 std::string
format(
const std::string& fmt,
297 const ValueWrapper a,
const ValueWrapper b,
298 const ValueWrapper c,
const ValueWrapper d,
299 const ValueWrapper e,
const ValueWrapper f,
300 const ValueWrapper g,
const ValueWrapper h);
336 std::string
format(
const std::string& fmt,
337 const ValueWrapper a,
const ValueWrapper b,
338 const ValueWrapper c,
const ValueWrapper d,
339 const ValueWrapper e,
const ValueWrapper f,
340 const ValueWrapper g,
const ValueWrapper h,
341 const ValueWrapper i);
379 std::string
format(
const std::string& fmt,
380 const ValueWrapper a,
const ValueWrapper b,
381 const ValueWrapper c,
const ValueWrapper d,
382 const ValueWrapper e,
const ValueWrapper f,
383 const ValueWrapper g,
const ValueWrapper h,
384 const ValueWrapper i,
const ValueWrapper j);
396 std::size_t n_handlers);
411 std::string
format(
const std::string& fmt,
418 std::string
format(
const std::string& fmt,
425 std::string
format(
const std::string& fmt,
433 std::string
format(
const std::string& fmt,
441 std::string
format(
const std::string& fmt,
450 std::string
format(
const std::string& fmt,
455 const ValueWrapper* handlers[] = {&a, &b, &c, &d, &e, &f};
459 std::string
format(
const std::string& fmt,
465 const ValueWrapper* handlers[] = {&a, &b, &c, &d, &e, &f, &g};
469 std::string
format(
const std::string& fmt,
475 const ValueWrapper* handlers[] = {&a, &b, &c, &d, &e, &f, &g, &h};
479 std::string
format(
const std::string& fmt,
486 const ValueWrapper* handlers[] = {&a, &b, &c, &d, &e, &f, &g, &h, &i};
490 std::string
format(
const std::string& fmt,
497 const ValueWrapper* handlers[] = {&a, &b, &c, &d, &e, &f, &g, &h, &i, &j};
505 std::size_t n_handlers)
507 std::string formatted = formatter_string;
508 std::size_t placeholder_position = 0;
509 for (std::size_t i=0; i<n_handlers; i++)
511 placeholder_position = formatted.find(
placeholder, placeholder_position);
512 if (placeholder_position != std::string::npos)
515 formatted.replace(placeholder_position,
placeholder.length(),
516 representation,0,std::string::npos);
517 placeholder_position += representation.length();
520 throw formatting_error(
"The number of placeholders doesn't match the number of provided arguments");
528 implementation_(new
formatting::internal::ValueWrapperImplementation<T>(v))
533 implementation_(new
formatting::internal::ValueWrapperImplementation<const char*>(
"invalid argument"))
538 implementation_(wrapper.implementation_)