summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/regex_compiler.h
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-03 16:16:33 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-03 16:16:33 +0000
commit4f6fa3026c5db251d9bbe1563c1acb148efd052c (patch)
treec13c1ae286178ffb64c18f64d2fdfe6999f5d043 /libstdc++-v3/include/bits/regex_compiler.h
parent760287521d820a13111df7108fefa68886075f85 (diff)
* include/bits/regex_compiler.h (_S_cache_size): Multiply the
RHS of the shift-expression by _UseCache::value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/regex_compiler.h')
-rw-r--r--libstdc++-v3/include/bits/regex_compiler.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index d8880cc4794f..66a4483ff7b5 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,