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
9212fcb8
Commit
9212fcb8
authored
Jun 26, 2012
by
Edward Smith-Rowland
Committed by
Edward Smith-Rowland
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add C++11 isms to tr2/dynamic_bitset and tr2/bool_set.
From-SVN: r188967
parent
0aba8600
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
libstdc++-v3/ChangeLog
+10
-0
libstdc++-v3/include/tr2/bool_set
+3
-3
libstdc++-v3/include/tr2/dynamic_bitset
+13
-12
No files found.
libstdc++-v3/ChangeLog
View file @
9212fcb8
2012-06-25 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/tr2/bool_set (count, size, num_blocks, empty, max_size):
Add noexcept.
2012-06-25 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/tr2/dynamic_bitset (count, size, num_blocks, empty, max_size):
Add noexcept.
2012-06-25 Benjamin Kosnik <bkoz@redhat.com>
2012-06-25 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/user.cfg.in: Change COMPACT_LATEX to NO.
* doc/doxygen/user.cfg.in: Change COMPACT_LATEX to NO.
...
...
libstdc++-v3/include/tr2/bool_set
View file @
9212fcb8
// TR2 <bool_set> -*- C++ -*-
// TR2 <bool_set> -*- C++ -*-
// Copyright (C) 2009, 2011 Free Software Foundation, Inc.
// Copyright (C) 2009, 2011
, 2012
Free Software Foundation, Inc.
//
//
// This file is part of the GNU ISO C++ Library. This library is free
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// software; you can redistribute it and/or modify it under the
...
@@ -56,10 +56,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
...
@@ -56,10 +56,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
public:
/// Default constructor.
/// Default constructor.
bool_set() : _M_b(_S_false) { }
constexpr
bool_set() : _M_b(_S_false) { }
/// Constructor from bool.
/// Constructor from bool.
bool_set(bool __t) : _M_b(_Bool_set_val(__t)) { }
constexpr
bool_set(bool __t) : _M_b(_Bool_set_val(__t)) { }
// I'm not sure about this.
// I'm not sure about this.
bool contains(bool_set __b) const
bool contains(bool_set __b) const
...
...
libstdc++-v3/include/tr2/dynamic_bitset
View file @
9212fcb8
// TR2 <dynamic_bitset> -*- C++ -*-
// TR2 <dynamic_bitset> -*- C++ -*-
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
// Copyright (C) 2009, 2010, 2011
, 2012
Free Software Foundation, Inc.
//
//
// This file is part of the GNU ISO C++ Library. This library is free
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// software; you can redistribute it and/or modify it under the
...
@@ -146,19 +146,19 @@ public:
...
@@ -146,19 +146,19 @@ public:
{ return this->_M_w.get_allocator(); }
{ return this->_M_w.get_allocator(); }
static size_type
static size_type
_S_whichword(size_type __pos)
_S_whichword(size_type __pos)
noexcept
{ return __pos / _S_bits_per_block; }
{ return __pos / _S_bits_per_block; }
static size_type
static size_type
_S_whichbyte(size_type __pos)
_S_whichbyte(size_type __pos)
noexcept
{ return (__pos % _S_bits_per_block) / __CHAR_BIT__; }
{ return (__pos % _S_bits_per_block) / __CHAR_BIT__; }
static size_type
static size_type
_S_whichbit(size_type __pos)
_S_whichbit(size_type __pos)
noexcept
{ return __pos % _S_bits_per_block; }
{ return __pos % _S_bits_per_block; }
static block_type
static block_type
_S_maskbit(size_type __pos)
_S_maskbit(size_type __pos)
noexcept
{ return (static_cast<block_type>(1)) << _S_whichbit(__pos); }
{ return (static_cast<block_type>(1)) << _S_whichbit(__pos); }
block_type&
block_type&
...
@@ -333,7 +333,7 @@ public:
...
@@ -333,7 +333,7 @@ public:
}
}
size_type
size_type
_M_size() const
_M_size() const
noexcept
{ return this->_M_w.size(); }
{ return this->_M_w.size(); }
unsigned long
unsigned long
...
@@ -1141,28 +1141,29 @@ public:
...
@@ -1141,28 +1141,29 @@ public:
/// Returns the number of bits which are set.
/// Returns the number of bits which are set.
size_type
size_type
count() const
count() const
noexcept
{ return this->_M_do_count(); }
{ return this->_M_do_count(); }
/// Returns the total number of bits.
/// Returns the total number of bits.
size_type
size_type
size() const
size() const
noexcept
{ return this->_M_Nb; }
{ return this->_M_Nb; }
/// Returns the total number of blocks.
/// Returns the total number of blocks.
size_type num_blocks() const
size_type
num_blocks() const noexcept
{ return this->_M_size(); }
{ return this->_M_size(); }
/// Returns true if the dynamic_bitset is empty.
/// Returns true if the dynamic_bitset is empty.
bool
bool
empty() const
empty() const
noexcept
{ return (this->_M_Nb == 0); }
{ return (this->_M_Nb == 0); }
/// Returns the maximum size of a dynamic_bitset object having the same
/// Returns the maximum size of a dynamic_bitset object having the same
/// type as *this.
/// type as *this.
/// The real answer is max() * bits_per_block but is likely to overflow.
/// The real answer is max() * bits_per_block but is likely to overflow.
/*constexpr*/
size_type
constexpr
size_type
max_size()
cons
t
max_size()
noexcep
t
{ return std::numeric_limits<block_type>::max(); }
{ return std::numeric_limits<block_type>::max(); }
/**
/**
...
...
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