aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-12-03 16:16:33 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-12-03 16:16:33 +0000
commit028c9c9ed7b71ed186829471b7b704ddfb0c5e26 (patch)
treec13c1ae286178ffb64c18f64d2fdfe6999f5d043 /libstdc++-v3
parent103265d61168fbb5b5d2b2c75767cde5e8d44600 (diff)
downloadgcc-028c9c9ed7b71ed186829471b7b704ddfb0c5e26.zip
gcc-028c9c9ed7b71ed186829471b7b704ddfb0c5e26.tar.gz
gcc-028c9c9ed7b71ed186829471b7b704ddfb0c5e26.tar.bz2
regex_compiler.h (_S_cache_size): Multiply the RHS of the shift-expression by _UseCache::value.
* include/bits/regex_compiler.h (_S_cache_size): Multiply the RHS of the shift-expression by _UseCache::value. From-SVN: r218322
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/regex_compiler.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9a51913..a3de7b0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-03 Marek Polacek <polacek@redhat.com>
+
+ * include/bits/regex_compiler.h (_S_cache_size): Multiply the
+ RHS of the shift-expression by _UseCache::value.
+
2014-12-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/64168
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index d8880cc..66a4483 100644
--- a/libstdc++-v3/include/bits/regex_compiler.h
+++ b/libstdc++-v3/include/bits/regex_compiler.h
@@ -417,7 +417,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef typename std::is_same<_CharT, char>::type _UseCache;
static constexpr size_t
- _S_cache_size() { return 1ul << (sizeof(_CharT) * __CHAR_BIT__); }
+ _S_cache_size()
+ {
+ return 1ul << (sizeof(_CharT) * __CHAR_BIT__ * int(_UseCache::value));
+ }
struct _Dummy { };
typedef typename std::conditional<_UseCache::value,