61 std::logic_error(reason)
84 std::string
format(
const std::string& fmt,
107 std::string
format(
const std::string& fmt,
132 std::string
format(
const std::string& fmt,
160 std::string
format(
const std::string& fmt,
190 std::string
format(
const std::string& fmt,
223 std::string
format(
const std::string& fmt,
258 std::string
format(
const std::string& fmt,
296 std::string
format(
const std::string& fmt,
336 std::string
format(
const std::string& fmt,
379 std::string
format(
const std::string& fmt,
396 std::size_t n_handlers);
406 std::string representation()
const;
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))