summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/stl_deque.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/stl_deque.h')
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 7f601cbf0fb..d7589f71d7a 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -72,11 +72,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* This function started off as a compiler kludge from SGI, but seems to
* be a useful wrapper around a repeated constant expression. The '512' is
* tunable (and no other code needs to change), but no investigation has
- * been done since inheriting the SGI code.
+ * been done since inheriting the SGI code. Touch _GLIBCXX_DEQUE_BUF_SIZE
+ * only if you know what you are doing, however: changing it breaks the
+ * binary compatibility!!
*/
+
+#ifndef _GLIBCXX_DEQUE_BUF_SIZE
+#define _GLIBCXX_DEQUE_BUF_SIZE 512
+#endif
+
inline size_t
__deque_buf_size(size_t __size)
- { return __size < 512 ? size_t(512 / __size) : size_t(1); }
+ { return (__size < _GLIBCXX_DEQUE_BUF_SIZE
+ ? size_t(_GLIBCXX_DEQUE_BUF_SIZE / __size) : size_t(1)); }
/**
@@ -1798,6 +1806,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
{ __x.swap(__y); }
+#undef _GLIBCXX_DEQUE_BUF_SIZE
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_DEQUE_H */