From f217166b2151c1f2f28c31cedd904dcad9df2263 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 7 Nov 2002 01:11:13 +0000 Subject: [PATCH] BOOST_DEDUCED_TYPENAME [SVN r16138] --- include/boost/config/compiler/visualc.hpp | 1 + include/boost/config/suffix.hpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 9194db5a..6ec0a777 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -46,6 +46,7 @@ # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_SWPRINTF # define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_DEDUCED_TYPENAME # if (_MSC_VER > 1200) # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # endif diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 332527f6..dd00fc18 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -313,6 +313,23 @@ namespace std { # define BOOST_NESTED_TEMPLATE #endif +// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// +// +// Some compilers don't support the use of `typename' for dependent +// types in deduced contexts, e.g. +// +// template void f(T, typename T::type); +// ^^^^^^^^ +// Replace these declarations with: +// +// template void f(T, BOOST_DEDUCED_TYPENAME T::type); + +#ifndef BOOST_NO_DEDUCED_TYPENAME +# define BOOST_DEDUCED_TYPENAME typename +#else +# define BOOST_DEDUCED_TYPENAME +#endif + // ---------------------------------------------------------------------------// //