There doesn't seem to be any reason for _S_cache_size to be a function
rather than a variable.  OK for trunk?
commit bf6843a87d3f64c9ffa29ce8d50aaa6fe8aabcfa
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Mar 14 21:39:06 2018 -0400

            * include/bits/regex_compiler.h (_S_cache_size): Change from
            function to variable.

diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index 7e5c2073554..6eee9cb9072 100644
--- a/libstdc++-v3/include/bits/regex_compiler.h
+++ b/libstdc++-v3/include/bits/regex_compiler.h
@@ -527,14 +527,12 @@ namespace __detail
       typedef typename std::is_same<_CharT, char>::type _UseCache;
 
       static constexpr size_t
-      _S_cache_size()
-      {
-	return 1ul << (sizeof(_CharT) * __CHAR_BIT__ * int(_UseCache::value));
-      }
+      _S_cache_size =
+	1ul << (sizeof(_CharT) * __CHAR_BIT__ * int(_UseCache::value));
 
       struct _Dummy { };
       typedef typename std::conditional<_UseCache::value,
-					std::bitset<_S_cache_size()>,
+					std::bitset<_S_cache_size>,
 					_Dummy>::type _CacheT;
       typedef typename std::make_unsigned<_CharT>::type _UnsignedCharT;
 

Reply via email to