From: Marek Polacek Date: Wed, 3 Dec 2014 16:16:33 +0000 (+0000) Subject: regex_compiler.h (_S_cache_size): Multiply the RHS of the shift-expression by _UseCac... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=028c9c9ed7b71ed186829471b7b704ddfb0c5e26;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9a519138f91..a3de7b096ae 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-12-03 Marek Polacek + + * include/bits/regex_compiler.h (_S_cache_size): Multiply the + RHS of the shift-expression by _UseCache::value. + 2014-12-03 Jonathan Wakely PR libstdc++/64168 diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h index d8880cc4794..66a4483ff7b 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,