diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-19 11:50:44 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-19 11:50:44 +0000 |
| commit | 45e0b6c81c8d056f8f76eb73789e84d4d6a21ec8 (patch) | |
| tree | 01cee7a539f7b5f514289603b022800143838636 /libstdc++-v3/include/debug/bitset | |
| parent | ebad7c3ee7b23989e2c65f1c47abab87ebcfb2e8 (diff) | |
| download | ppe42-gcc-45e0b6c81c8d056f8f76eb73789e84d4d6a21ec8.tar.gz ppe42-gcc-45e0b6c81c8d056f8f76eb73789e84d4d6a21ec8.zip | |
2011-11-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/bitset (operator[](size_t) const): Declare constexpr.
* include/profile/bitset: Likewise.
* testsuite/23_containers/bitset/operations/constexpr.cc: Split out
non portable bits to...
* testsuite/23_containers/bitset/operations/constexpr-2.cc: ... here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181506 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/bitset')
| -rw-r--r-- | libstdc++-v3/include/debug/bitset | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset index f44bbcddefd..3d865c1c1c2 100644 --- a/libstdc++-v3/include/debug/bitset +++ b/libstdc++-v3/include/debug/bitset @@ -51,7 +51,7 @@ namespace __debug public: // In C++0x we rely on normal reference type to preserve the property // of bitset to be use as a literal. - // TODO: Find an other solution. + // TODO: Find another solution. #ifdef __GXX_EXPERIMENTAL_CXX0X__ typedef typename _Base::reference reference; #else @@ -272,11 +272,14 @@ namespace __debug // _GLIBCXX_RESOLVE_LIB_DEFECTS // 11. Bitset minor problems - bool + _GLIBCXX_CONSTEXPR bool operator[](size_t __pos) const { +#ifndef __GXX_EXPERIMENTAL_CXX0X__ + // TODO: Check in debug-mode too. __glibcxx_check_subscript(__pos); - return _M_base()[__pos]; +#endif + return _Base::operator[](__pos); } using _Base::to_ulong; |

