Commit 028c9c9e by Marek Polacek Committed by Marek Polacek

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
parent 103265d6
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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment