summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-15 16:34:06 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-15 16:34:06 +0000
commit427550340214769914f0c10aa8954c2f4f2971bc (patch)
treed3e4aa95ab3a99279c52268b0b57cd6f07a65882 /libstdc++-v3/include/bits
parent7b96e840b11c4755e8b16a746c101a25d98562c2 (diff)
downloadppe42-gcc-427550340214769914f0c10aa8954c2f4f2971bc.tar.gz
ppe42-gcc-427550340214769914f0c10aa8954c2f4f2971bc.zip
* include/bits/stl_bvector.h (vector<bool>::emplace_back()): LWG 2187:
Define. (vector<bool>::emplace()): Likewise. * testsuite/23_containers/vector/bool/emplace.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 8e4b0230614..3b5a0c2b63e 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -971,7 +971,18 @@ template<typename _Alloc>
clear() _GLIBCXX_NOEXCEPT
{ _M_erase_at_end(begin()); }
-
+#if __cplusplus >= 201103L
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args)
+ { push_back(bool(__args...)); }
+
+ template<typename... _Args>
+ iterator
+ emplace(const_iterator __pos, _Args&&... __args)
+ { return insert(__pos, bool(__args...)); }
+#endif
+
protected:
// Precondition: __first._M_offset == 0 && __result._M_offset == 0.
iterator
OpenPOWER on IntegriCloud