FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
December 01, 2003

Efficient Variable Automatic Buffers

(Page 2 of 6)
Efficient Variable Automatic Buffers

Listing 2: Extract from stlsoft_constraints.h.
 /* /////////////////////////////////////////////////////////////

* Extract from stlsoft_constraints.h * www: http://www.stlsoft.org/ * Copyright (C) 2002-2003, Synesis Software Pty Ltd. * (Licensed under the Synesis Software Standard Source License: * http://www.synesis.com.au/licenses/ssssl.html) * ////////////////////////////////////////////////////////// */ template <typename T> union type_is_non_class_or_trivial_class { T t; int i; // ctor is required to satisy Metrowerks type_is_non_class_or_trivial_class() {} }; #define stlsoft_constraint_type_is_non_class_or_trivial_class(_T) \ stlsoft_static_assert( \ sizeof( \ stlsoft::type_is_non_class_or_trivial_class<_T>) != 0) /* ////////////////////////////////////////////////////////// */
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK