From b87a77764def989271a4b0bad5835163347f8f18 Mon Sep 17 00:00:00 2001 From: humesikkins Date: Wed, 5 Mar 2003 23:40:08 +0000 Subject: [PATCH] workaround for error C2182: '__formal' illegal use of type 'void' git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@114 7ec92016-0320-0410-acc4-a06ded1c099a --- MSVC/1200/MSVC6Helpers.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/MSVC/1200/MSVC6Helpers.h b/MSVC/1200/MSVC6Helpers.h index 0fe0230..a35d995 100644 --- a/MSVC/1200/MSVC6Helpers.h +++ b/MSVC/1200/MSVC6Helpers.h @@ -1,4 +1,5 @@ -// Last update: Dec 03, 2002 +// Last update: Mar 06, 2003 +// Added VoidWrap // Added qualification ::Loki::Private:: to types from the Private-Namespace // Thanks to Adi Shavit @@ -7,6 +8,7 @@ #if !defined (_MSC_VER) || _MSC_VER >= 1300 #error "please use this header only with MSVC 6.0" #endif +#include "TypeManip.h" namespace Loki { namespace Private @@ -29,7 +31,16 @@ namespace Loki // type of cv void (6.6.3). // Functor.h uses this Type as a workaround. struct VoidAsType {}; - + + // workaround for error C2182: '__formal' illegal use of type 'void' + // when trying to use void as default value of a template parameter. + // Instead of template class bla {}; + // simply write template class bla {}; + // and the VC 6.0 will be happy. + struct VoidWrap + { + typedef void type; + }; // workarounds for template template parameters //////////////////////////////////////////////////////////////////////////////// // class template AlwaysFalse