|
Boost : |
From: Zack Weinberg (zackw_at_[hidden])
Date: 2007-03-03 13:50:15
Some of the boost::format constructors do not initialize the object
locals in the order of declaration, leading to annoying warnings from
g++:
$ cat test.cc
#include <boost/format.hpp>
std::string ntos(int n, std::locale & l)
{
return (boost::format("%d", l) % n).str();
}
$ g++ -c -Wall test.cc
/usr/include/boost/format/format_class.hpp: In constructor
'boost::basic_format<Ch, Tr, Alloc>::basic_format(const Ch*, const
std::locale&) [with Ch = char, Tr = std::char_traits<char>, Alloc =
std::allocator<char>]':
test.cc:5: instantiated from here
/usr/include/boost/format/format_class.hpp:137: warning:
'boost::basic_format<char, std::char_traits<char>,
std::allocator<char> >::loc_' will be initialized after
/usr/include/boost/format/format_class.hpp:135: warning: 'unsigned
char boost::basic_format<char, std::char_traits<char>,
std::allocator<char>
>::exceptions_'/usr/include/boost/format/format_implementation.hpp:38:
warning: when initialized here
zw
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk