OSDN Git Service

Add initializer_list support as per N2679.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / debug / set.h
index 3115610..00711cd 100644 (file)
@@ -96,6 +96,11 @@ namespace __debug
       set(set&& __x)
       : _Base(std::forward<set>(__x)), _Safe_base()
       { this->_M_swap(__x); }
+
+      set(initializer_list<value_type> __l,
+         const _Compare& __comp = _Compare(),
+         const allocator_type& __a = allocator_type())
+       : _Base(__l, __comp, __a), _Safe_base() { }
 #endif
 
       ~set() { }
@@ -117,6 +122,14 @@ namespace __debug
        swap(__x);
        return *this;
       }
+
+      set&
+      operator=(initializer_list<value_type> __l)
+      {
+       this->clear();
+       this->insert(__l);
+       return *this;
+      }
 #endif
 
       using _Base::get_allocator;
@@ -202,6 +215,12 @@ namespace __debug
          _Base::insert(__first, __last);
        }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      insert(initializer_list<value_type> __l)
+      { _Base::insert(__l); }
+#endif
+
       void
       erase(iterator __position)
       {