boost-format Questions
5
Solved
Anything like Boost.Format in the C++11 standard? I've been able to avoid using Boost with a better C++11 option for every other need I've had.
For that matter, Boost.Format doesn't hold a candle ...
Searby asked 1/5, 2014 at 17:26
2
Solved
The Boost Format documentation says:
One of its goal is to provide a replacement for printf, that means
format can parse a format-string designed for printf, apply it to the
given arguments, a...
Ingvar asked 20/11, 2015 at 9:20
3
Solved
Suppose I have a printf-like function (used for logging) utilizing perfect forwarding:
template<typename... Arguments>
void awesome_printf(std::string const& fmt, Arguments&&... ...
Superaltar asked 16/9, 2014 at 2:11
3
Solved
I want to format a floating point value to n significant digits but never using scientific notation (even if it would be shorter).
The format specification %f doesn't deal in significant digits, a...
Comras asked 20/6, 2013 at 10:19
2
Solved
Following is not possible:
std::string s = boost::format("%d") % 1; // error
You have to explicitely call the method str():
std::string s = (boost::format("%d") % 1).str(); // OK
It wou...
Trigger asked 18/10, 2012 at 8:56
4
Solved
I have a function in my namespace ns that helps me print STL containers. For example:
template <typename T>
std::ostream& operator<<(std::ostream& stream, const std::set<T&g...
Kimberlykimberlyn asked 30/5, 2012 at 0:14
1
Solved
I know that using the %s format specifier and std::string like this leads to undefined behaviour:
std::string myString = "test";
printf("%s", myString);
But is it save to use the same specifier ...
Quintonquintuple asked 20/5, 2012 at 8:37
1
Solved
I was wondering whether Boost.Format does support using a fixed-width / preallocated buffer as output instead of a dynamic buffer managed by the lib itself?
That is, normally you'd do:
boost::for...
Incretion asked 2/11, 2011 at 13:33
1
© 2022 - 2024 — McMap. All rights reserved.