From c86fcbf4567f7c5ceef9776fc108b1ca75864a9c Mon Sep 17 00:00:00 2001 From: Daniel Frey Date: Sat, 16 Aug 2003 01:05:43 +0000 Subject: [PATCH] Fix for Metrowerks CW [SVN r19626] --- include/boost/checked_delete.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/checked_delete.hpp b/include/boost/checked_delete.hpp index 3f7ca47..480c041 100644 --- a/include/boost/checked_delete.hpp +++ b/include/boost/checked_delete.hpp @@ -10,6 +10,8 @@ // // Copyright (c) 1999, 2000, 2001, 2002 boost.org // Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant // // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -26,14 +28,16 @@ namespace boost template inline void checked_delete(T * x) { - // Intel 7 accepts sizeof(incomplete) as 0 in system headers + // intentionally complex - simplification causes regressions typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); delete x; } template inline void checked_array_delete(T * x) { typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); delete [] x; }