Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libstdc++-v3 / include / debug / multiset.h
index 9f51000..3cc761e 100644 (file)
@@ -1,7 +1,6 @@
 // Debugging multiset implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2003-2013 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -92,7 +91,7 @@ namespace __debug
       multiset(const _Base& __x)
       : _Base(__x) { }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       multiset(multiset&& __x)
       noexcept(is_nothrow_copy_constructible<_Compare>::value)
       : _Base(std::move(__x))
@@ -114,12 +113,13 @@ namespace __debug
        return *this;
       }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       multiset&
       operator=(multiset&& __x)
       {
        // NB: DR 1204.
        // NB: DR 675.
+       __glibcxx_check_self_move_assign(__x);
        clear();
        swap(__x);
        return *this;
@@ -169,7 +169,7 @@ namespace __debug
       rend() const _GLIBCXX_NOEXCEPT
       { return const_reverse_iterator(begin()); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       const_iterator
       cbegin() const noexcept
       { return const_iterator(_Base::begin(), this); }
@@ -193,11 +193,30 @@ namespace __debug
       using _Base::max_size;
 
       // modifiers:
+#if __cplusplus >= 201103L
+      template<typename... _Args>
+       iterator
+       emplace(_Args&&... __args)
+       {
+         return iterator(_Base::emplace(std::forward<_Args>(__args)...), this);
+       }
+
+      template<typename... _Args>
+       iterator
+       emplace_hint(const_iterator __pos, _Args&&... __args)
+       {
+         __glibcxx_check_insert(__pos);
+         return iterator(_Base::emplace_hint(__pos.base(),
+                                             std::forward<_Args>(__args)...),
+                         this);
+       }
+#endif
+
       iterator
       insert(const value_type& __x)
       { return iterator(_Base::insert(__x), this); }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       iterator
       insert(value_type&& __x)
       { return iterator(_Base::insert(std::move(__x)), this); }
@@ -210,7 +229,7 @@ namespace __debug
        return iterator(_Base::insert(__position.base(), __x), this);
       }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       iterator
       insert(const_iterator __position, value_type&& __x)
       {
@@ -229,13 +248,13 @@ namespace __debug
                        __gnu_debug::__base(__last));
        }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       void
       insert(initializer_list<value_type> __l)
       { _Base::insert(__l); }
 #endif
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       iterator
       erase(const_iterator __position)
       {
@@ -269,7 +288,7 @@ namespace __debug
        return __count;
       }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       iterator
       erase(const_iterator __first, const_iterator __last)
       {