Hi,
Today I updated my svn working directory, and, WOW, new updates! But my
gcc 4.1.2 complains while compiling the message_transform_test.cpp:
../../../boost/network/message/transformers.hpp:21: error: non-template
‘type’ used as template
../../../boost/network/message/transformers.hpp:21: note: use
‘Algorithm::template type’ to indicate that it is a template
../../../boost/network/message/transformers.hpp:21: error: declaration
does not declare anything
"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g
-DBOOST_TEST_NO_AUTO_LINK=1 -I"../../.." -I"/usr/src/boost_1_34_0" -c
-o "bin/gcc-4.1.2/debug/link-static/message_test.o" "message_test.cpp"
As gcc suggests, I added the `template' keyword as following, and it
works fine:
template <class Algorithm, class Selector>
struct get_real_algorithm {
typedef typename Algorithm::template type<Selector> type;
};
I haven't try the original code under any version of msvc, but I think
msvc may be more fault tolerant than gcc. I had once encountered a
similar situation about `typename' :-)
Cheers
Cheng
|