From ca6c441841e8ca9d915dd771f111685dc2155d79 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Fri, 10 Nov 2000 17:48:15 +0000 Subject: [PATCH] * include/bits/cpp_type_traits.h: Fix typos. Adjust formatting. From-SVN: r37373 --- libstdc++-v3/ChangeLog | 4 ++ libstdc++-v3/include/bits/cpp_type_traits.h | 48 +++++++++------------ 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3558c0a892e..7f754db5dd0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2000-11-10 Gabriel Dos Reis + + * include/bits/cpp_type_traits.h: Fix typos. Adjust formatting. + 2000-11-10 Gabriel Dos Reis * include/bits/localefwd.h (_Count_ones<>::_S_halfcount, diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 2b62ee8926e..ae232ad095b 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -34,47 +34,48 @@ // // This file provides some compile-time information about various types. -// These informations were designed, on purpose, to be constant-expressions +// These representations were designed, on purpose, to be constant-expressions // and not types as found in . In particular, they // can be used in control structures and the optimizer hopefully will do // the obvious thing. // // Why integral expressions, and not functions nor types? -// Firstly, these compile-time information entities are used as -// template-arguments so function return values won't work. We -// need compile-time entities. We're left with types and constant -// integral expressions. -// Secondly, from the point of view of ease of use type-based compile-time +// Firstly, these compile-time entities are used as template-arguments +// so function return values won't work: We need compile-time entities. +// We're left with types and constant integral expressions. +// Secondly, from the point of view of ease of use, type-based compile-time // information is -not- *that* convenient. On has to write lots of // overloaded functions and to hope that the compiler will select the right // one. As a net effect, the overall structure isn't very clear at first // glance. -// Thirdly, partial ordering and overload resolution (of template functions) -// is very costly in terms of compiler-resource. It is a Good Thing to +// Thirdly, partial ordering and overload resolution (of function templates) +// is highly costly in terms of compiler-resource. It is a Good Thing to // keep these resource consumption as least as possible. // +// See valarray_array.h for a case use. +// // -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06. // -namespace std { - +namespace std +{ template - struct __is_void - { - enum + struct __is_void { - _M_type = 0 + enum + { + _M_type = 0 + }; }; - }; template<> - struct __is_void - { - enum + struct __is_void { - _M_type = 1 + enum + { + _M_type = 1 + }; }; - }; // // Integer types @@ -292,10 +293,3 @@ namespace std { #endif //_CPP_BITS_CPP_TYPE_TRAITS_H - - - - - - - -- 2.30.2