using boost::format with STLPort
Hello,
I have a problem when I try to include "boost/format.hpp" from Boost 1.32 in
a project that uses STLPort library.
I am using MSVC 7.1 and the compiler prints the following error:
\boost\format\format_implementation.hpp(216) : error C2244:
'boost::basic_format
On 12/31/04 9:15 AM, "Alexey Bakhvalov"
I have a problem when I try to include "boost/format.hpp" from Boost 1.32 in a project that uses STLPort library.
I am using MSVC 7.1 and the compiler prints the following error:
\boost\format\format_implementation.hpp(216) : error C2244: 'boost::basic_format
::size' : unable to match function definition to an existing declaration \boost\format\format_class.hpp(58) : see declaration of 'boost::basic_format ::size' definition 'basic_format ::size_type boost::basic_format ::size(void) const' existing declarations 'boost::basic_format ::size_type boost::basic_format ::size(void) const' If I switch back to Boost 1.31 or don't use STLPort then the problem goes away.
I just wonder what can be the cause of such strange error because I can't see any difference between function's definition and declaration. Also I use many other Boost libraries and don't have this problem with either of them.
::size_type" while the definition's return type doesn't have the "boost::" namespace prefix. I haven't looked at the source of Format, so I don't know where the difference comes from, or why it's fatal. Maybe it's lookup
I see one difference. It's in the return type of the definition vs. the declaration. The declaration uses "boost::basic_format< Ch, Tr, Alloc problems. Maybe STLPort actually has an item named "basic_format"? -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Alexey Bakhvalov a écrit :
Hello,
I have a problem when I try to include "boost/format.hpp" from Boost 1.32 in a project that uses STLPort library.
I am using MSVC 7.1 and the compiler prints the following error:
\boost\format\format_implementation.hpp(216) : error C2244: 'boost::basic_format
::size' : unable to match function definition to an existing declaration
I just finished installing VStudio.net 2003 (which is 7.1, I believe), and this definitely looks like a bug in visual studio. The following sample exhibits the same behaviour template<class T> struct A { typedef T* some_type; }; template<class T> struct B { typedef typename A<T>::some_type le_type; le_type some_f(); }; template<class T> typename B<T>::le_type B<T>::some_f() { le_type x; return x; } Is it a known bug ? Replacing B<T>::le_type with A<T>::some_type when defining B<T>::some_f() seem to be a work around. -- Samuel
participants (3)
-
Alexey Bakhvalov
-
Daryle Walker
-
Samuel Krempp