summaryrefslogtreecommitdiff
blob: bd88cb476e8aa442288f23ba33256bcb12de8b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# work around gcc-4.9.3's implementation of cxx14
# bug  582576 with patch from Alexander Miller
# https://bugs.gentoo.org/show_bug.cgi?id=582576

--- a/src/lib/util/strformat.h
+++ b/src/lib/util/strformat.h
@@ -185,9 +185,8 @@
 #include <type_traits>
 #include <utility>
 
-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150413)
-namespace std
-{
+namespace std {
+namespace mame_cxx14_compat {
 template<class _Container>
 	inline constexpr auto
 	cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))
@@ -198,7 +197,8 @@
 	cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
 	{ return std::end(__cont); }
 }
-#endif
+using namespace mame_cxx14_compat;
+}
 
 namespace util {
 namespace detail {