hi,
here is the code fragment in my win32 project:
namespace gtl
{
typedef unsigned int dword;
};
void myFun( const char * _szText ){}
int i = 10;
myFun( boost::str( boost::format( " Page %2d" ) %i ).c_str() );
but there is so many more warinings as below:
LobbyRoomListWnd.cpp
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(100)
: warning C4244: '+=' : conversion from '__w64 int' to
'boost::io::basic_altstringbuf::off_type', possible loss of
data
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
c:\program files\microsoft visual studio .net 2003\vc7\include\xtree(267) :
while compiling class-template member function
'boost::io::basic_altstringbuf::pos_type
boost::io::basic_altstringbuf::seekoff
(boost::io::basic_altstringbuf::off_type,std::_Iosb<_Dummy>::seekdir,std::_Iosb<_Dummy>::openmode)'
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>,
_Dummy=int
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\format_class.hpp(136)
: see reference to class template instantiation
'boost::io::basic_altstringbuf' being compiled
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
d:\working\alan_gamma\richonlineclient\roclient\game\lobby\lobbyroomlistwnd.cpp(427)
: see reference to class template instantiation
'boost::basic_format<Ch>' being compiled
with
[
Ch=char
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(102)
: warning C4244: '+=' : conversion from '__w64 int' to
'boost::io::basic_altstringbuf::off_type', possible loss of
data
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(110)
: warning C4244: 'argument' : conversion from '__w64 int' to 'int', possible
loss of data
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(118)
: warning C4244: '+=' : conversion from '__w64 int' to
'boost::io::basic_altstringbuf::off_type', possible loss of
data
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(120)
: warning C4244: '+=' : conversion from '__w64 int' to
'boost::io::basic_altstringbuf::off_type', possible loss of
data
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(151)
: warning C4244: 'argument' : conversion from '__w64 int' to 'int', possible
loss of data
c:\program files\microsoft visual studio .net 2003\vc7\include\xtree(267) :
while compiling class-template member function
'boost::io::basic_altstringbuf::pos_type
boost::io::basic_altstringbuf::seekpos
(boost::io::basic_altstringbuf::pos_type,std::_Iosb<_Dummy>::openmode)'
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>,
_Dummy=int
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(160)
: warning C4244: 'argument' : conversion from '__w64 long' to 'int',
possible loss of data
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(265)
: warning C4244: 'initializing' : conversion from '__w64 int' to 'int',
possible loss of data
c:\program files\microsoft visual studio .net 2003\vc7\include\xtree(267) :
while compiling class-template member function
'boost::io::basic_altstringbuf::int_type
boost::io::basic_altstringbuf::overflow
(boost::io::basic_altstringbuf::int_type)'
with
[
Ch=char,
Tr=std::char_traits<char>,
Alloc=std::allocator<char>
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\alt_sstream_impl.hpp(266)
: warning C4244: 'initializing' : conversion from '__w64 int' to 'int',
possible loss of data
d:\working\alan_gamma\publiclibrary\boost\boost\format\format_implementation.hpp(193)
: warning C4267: 'initializing' : conversion from 'size_t' to
'std::streamsize', possible loss of data
c:\program files\microsoft visual studio .net 2003\vc7\include\ios(119) :
while compiling class-template member function
'boost::basic_format<Ch>::string_type boost::basic_format<Ch>::str(void)
const'
with
[
Ch=char
]
c:\program files\microsoft visual studio .net 2003\vc7\include\xtree(267) :
while compiling class-template member function
'boost::basic_format<Ch>::basic_format(const Ch *)'
with
[
Ch=char
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\format_implementation.hpp(206)
: warning C4267: 'initializing' : conversion from 'size_t' to
'std::streamsize', possible loss of data
d:\working\alan_gamma\publiclibrary\boost\boost\optional\optional.hpp(102) :
while compiling class-template member function
'boost::basic_format<Ch>::size_type boost::basic_format<Ch>::size(void)
const'
with
[
Ch=char
]
c:\program files\microsoft visual studio .net 2003\vc7\include\ios(119) :
while compiling class-template member function 'boost::basic_format<Ch>
&boost::basic_format<Ch>::parse(const boost::basic_format<Ch>::string_type
&)'
with
[
Ch=char
]
d:\working\alan_gamma\publiclibrary\boost\boost\format\format_implementation.hpp(210)
: warning C4267: '+=' : conversion from 'size_t' to 'std::streamsize',
possible loss of data
d:\working\alan_gamma\publiclibrary\boost\boost\format\format_implementation.hpp(213)
: warning C4267: '+=' : conversion from 'size_t' to 'std::streamsize',
possible loss of data
RichOnline.cpp
c:\program files\microsoft visual studio .net
2003\vc7\include\xutility(1136) : warning C4267: '=' : conversion from
'size_t' to
'std::allocator<_Ty>::value_type', possible loss of data
with
[
_Ty=gtl::dword
]
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(862) :
see reference to function template instantiation 'void
std::fill::_Tptr,_Ty>(_FwdIt,_FwdIt,const _Ty &)' being
compiled
with
[
_Ty=size_t,
_FwdIt=std::vector::_Tptr
]
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(809) :
while compiling class-template member function 'void
std::vector<_Ty>::_Insert_n(std::vector<_Ty>::iterator,std::vector<_Ty>::size_type,const
_Ty &)'
with
[
_Ty=size_t
]
d:\working\alan_gamma\publiclibrary\boost\boost\regex\v4\cregex.hpp(229) :
see reference to class template instantiation 'std::vector<_Ty>' being
compiled
with
[
_Ty=size_t
]
c:\program files\microsoft visual studio .net
2003\vc7\include\xutility(1161) : warning C4267: '=' : conversion from
'size_t' to
'std::allocator<_Ty>::value_type', possible loss of data
with
[
_Ty=gtl::dword
]
c:\program files\microsoft visual studio .net 2003\vc7\include\memory(237) :
see reference to function template instantiation 'void
std::fill_n<_Ty*,_Diff,_Tval>(_OutIt,_Diff,const _Ty &)' being compiled
with
[
_Ty=std::allocatorgtl::dword::value_type,
_Diff=std::vector::size_type,
_Tval=size_t,
_OutIt=std::allocatorgtl::dword::value_type *
]
c:\program files\microsoft visual studio .net 2003\vc7\include\memory(257) :
see reference to function template instantiation 'void
std::_Uninit_fill_n::value_type,_Diff,_Tval>(_Ty
*,_Diff,const _Tval &,std::allocator<_Ty> &,std::_Scalar_ptr_iterator_tag)'
being
compiled
with
[
_Ty=gtl::dword,
_Diff=std::vector::size_type,
_Tval=size_t
]
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(878) :
see reference to function template instantiation 'void
std::_Uninitialized_fill_n::pointer,std::vector<_Ty>::size_type,_Ty,std::_Vector_val<_Ty,_Alloc>::_Alty>(_FwdIt,_Diff,const
_Tval &,_Alloc
&)' being compiled
with
[
_Ty=size_t,
_Alloc=std::allocatorgtl::dword,
_FwdIt=std::vector::pointer,
_Diff=std::vector::size_type,
_Tval=size_t
]
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(877) :
while compiling class-template member function
'std::vector<_Ty>::pointer
std::vector<_Ty>::_Ufill(std::vector<_Ty>::pointer,std::vector<_Ty>::size_type,const
_Ty &)'
with
[
_Ty=size_t
]
thanks very much for any reply.
--
Yours Sincerely,
Alan Huang