Boost logo

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

$ cat
#include <boost/format.hpp>

std::string ntos(int n, std::locale & l)
    return (boost::format("%d", l) % n).str();
$ g++ -c -Wall
/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>]': 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>,
warning: when initialized here


Boost list run by bdawes at, gregod at, cpdaniel at, john at