
When I included regex.hpp into my project: #include <boost\regex.hpp> I received the following errors c:\cvsprojectsroot\renaissance\3rdpartyfiles\boostlibrary\boost\regex. hpp(860) : error C2899: typename cannot be used outside a template declaration c:\cvsprojectsroot\renaissance\3rdpartyfiles\boostlibrary\boost\regex. hpp(440) : error C2899: typename cannot be used outside a template declaration So at lines 440-2 template <class iterator, class Allocator = #if !(defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)) BOOST_DEFAULT_ALLOCATOR(typename re_detail::def_alloc_param_traits<iterator>::type) > I Tried the following: //This section was altered to handle the problem of the VS6 compiler not handling of a typename in a macro for a template parameter-DWW 02/06/2003 template<class iterator> class def_alloc_param_traits_fixclass { public: typedef typename re_detail::def_alloc_param_traits<iterator>::type def_alloc_param_traits_fix; }; template <class iterator, class Allocator = #if !(defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)) //BOOST_DEFAULT_ALLOCATOR(typename re_detail::def_alloc_param_traits<iterator>::type) > BOOST_DEFAULT_ALLOCATOR (def_alloc_param_traits_fixclass<iterator>::def_alloc_param_traits_fix ) > //End of section altered to handle the problem of the VS6 compiler not handling of a typename in a macro for a template parameter-DWW 02/06/2003 And at lines 858-862 namespace re_detail{ template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR (typename def_alloc_param_traits<iterator>::type) > class match_results_base { I tried: namespace re_detail{ //This section was altered to handle the problem of the VS6 compiler not handling of a typename in a macro for a template parameter-DWW 02/06/2003 template<class iterator> class def_alloc_fixclass { public: typedef typename def_alloc_param_traits<iterator>::type def_alloc_fix; }; //template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR (typename def_alloc_param_traits<iterator>::type) > template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(def_alloc_fixclass<iterator>::def_alloc_fix) > //End of section altered to handle the problem of the VS6 compiler not handling of a typename in a macro for a template parameter-DWW 02/06/2003 class match_results_base { This compiled OK, has any one else had this problem and any comments on this fix or is there anything else that I missed so I do nto have to change the regex.hpp file? it appeared to me that the VS6 compile has a problem with a typename as a parameter in a macro that is in turn a template parameter. Thank you for any help.