Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ca6c4418
Commit
ca6c4418
authored
Nov 10, 2000
by
Gabriel Dos Reis
Committed by
Gabriel Dos Reis
Nov 10, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* include/bits/cpp_type_traits.h: Fix typos. Adjust formatting.
From-SVN: r37373
parent
982b8443
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
27 deletions
+25
-27
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/include/bits/cpp_type_traits.h
+21
-27
No files found.
libstdc++-v3/ChangeLog
View file @
ca6c4418
2000-11-10 Gabriel Dos Reis <gdr@codesourcery.com>
* include/bits/cpp_type_traits.h: Fix typos. Adjust formatting.
2000-11-10 Gabriel Dos Reis <gdr@codesourcery.com>
* include/bits/localefwd.h (_Count_ones<>::_S_halfcount,
_Count_ones<>::_S_count): Turn into enumerators.
...
...
libstdc++-v3/include/bits/cpp_type_traits.h
View file @
ca6c4418
...
...
@@ -34,47 +34,48 @@
//
// This file provides some compile-time information about various types.
// These
inform
ations were designed, on purpose, to be constant-expressions
// These
represent
ations were designed, on purpose, to be constant-expressions
// and not types as found in <stl/bits/type_traits.h>. 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 function
s)
// is
ver
y costly in terms of compiler-resource. It is a Good Thing to
// Thirdly, partial ordering and overload resolution (of
function template
s)
// is
highl
y 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
<
typename
_Tp
>
struct
__is_void
{
enum
struct
__is_void
{
_M_type
=
0
enum
{
_M_type
=
0
};
};
};
template
<>
struct
__is_void
<
void
>
{
enum
struct
__is_void
<
void
>
{
_M_type
=
1
enum
{
_M_type
=
1
};
};
};
//
// Integer types
...
...
@@ -292,10 +293,3 @@ namespace std {
#endif //_CPP_BITS_CPP_TYPE_TRAITS_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment