mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 23:14:02 +00:00
Fix for Metrowerks CW
[SVN r19626]
This commit is contained in:
parent
6ded8b9ad6
commit
c86fcbf456
@ -10,6 +10,8 @@
|
|||||||
//
|
//
|
||||||
// Copyright (c) 1999, 2000, 2001, 2002 boost.org
|
// Copyright (c) 1999, 2000, 2001, 2002 boost.org
|
||||||
// Copyright (c) 2002, 2003 Peter Dimov
|
// 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
|
// Permission to copy, use, modify, sell and distribute this software
|
||||||
// is granted provided this copyright notice appears in all copies.
|
// is granted provided this copyright notice appears in all copies.
|
||||||
@ -26,14 +28,16 @@ namespace boost
|
|||||||
|
|
||||||
template<class T> inline void checked_delete(T * x)
|
template<class T> 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 ];
|
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
|
||||||
|
(void) sizeof(type_must_be_complete);
|
||||||
delete x;
|
delete x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> inline void checked_array_delete(T * x)
|
template<class T> inline void checked_array_delete(T * x)
|
||||||
{
|
{
|
||||||
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
|
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
|
||||||
|
(void) sizeof(type_must_be_complete);
|
||||||
delete [] x;
|
delete [] x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user