diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-30 21:10:18 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-30 21:10:18 +0000 |
commit | 8fd6dc0df3715938e67973c8a9e7e2636c0d42e6 (patch) | |
tree | 129a78ba979ad57db4a5d4f5d5b7e1a909d9196f /libcxx/include/ext | |
parent | aa41ea2cc1c509b21fd99a4f1dc22d2243906cf5 (diff) | |
download | bcm5719-llvm-8fd6dc0df3715938e67973c8a9e7e2636c0d42e6.tar.gz bcm5719-llvm-8fd6dc0df3715938e67973c8a9e7e2636c0d42e6.zip |
Revert r136547, r136545, and r136542 by removing slist.
This was checked in without review. It is not clear its reasonable to
include with libc++ at all, and needs discussion at a highlevel before
moving forward.
It's also completely lacking tests, and included several bugs in the
implementation.
llvm-svn: 136577
Diffstat (limited to 'libcxx/include/ext')
-rw-r--r-- | libcxx/include/ext/slist | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/libcxx/include/ext/slist b/libcxx/include/ext/slist deleted file mode 100644 index 30ba7e30b43..00000000000 --- a/libcxx/include/ext/slist +++ /dev/null @@ -1,126 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP__EXT_SLIST -#define _LIBCPP__EXT_SLIST - -#include <__config> -#include <forward_list> -#include <iterator> - -#pragma GCC system_header - -namespace __gnu_cxx { - -using namespace std; - -template <class _Tp, class _Alloc = allocator<_Tp> > -class _LIBCPP_VISIBLE slist : forward_list<_Tp, _Alloc> -{ -public: - typedef forward_list<_Tp, _Alloc> __base_type; - using typename __base_type::value_type; - using typename __base_type::pointer; - using typename __base_type::reference; - using typename __base_type::const_reference; - using typename __base_type::size_type; - using typename __base_type::difference_type; - using typename __base_type::iterator; - using typename __base_type::const_iterator; - using __base_type::begin; - using __base_type::end; - using __base_type::max_size; - using __base_type::empty; - using __base_type::front; - using __base_type::push_front; - using __base_type::pop_front; - using __base_type::clear; - using __base_type::resize; - using __base_type::insert_after; - using __base_type::erase_after; - using __base_type::splice_after; - using __base_type::remove; - using __base_type::remove_if; - using __base_type::unique; - using __base_type::sort; - using __base_type::reverse; - - _LIBCPP_INLINE_VISIBILITY - slist() { } - _LIBCPP_INLINE_VISIBILITY - slist(size_type __n) : __base_type(__n) { } - _LIBCPP_INLINE_VISIBILITY - slist(size_type __n, const _Tp& __t) : __base_type(__n, __t) { } - template <typename _InputIterator> - _LIBCPP_INLINE_VISIBILITY - slist(_InputIterator __f, _InputIterator __l) : __base_type(__f, __l) { } - - _LIBCPP_INLINE_VISIBILITY - void swap (slist& __s) { __base_type::swap(__s); } - - _LIBCPP_INLINE_VISIBILITY - void merge (slist& __s) { __base_type::merge(__s); } - - _LIBCPP_INLINE_VISIBILITY - friend bool operator==(const slist& __l, const slist& __r) - { - return static_cast<const __base_type&>(__l) == - static_cast<const __base_type&>(__r); - } - _LIBCPP_INLINE_VISIBILITY - friend bool operator<(const slist& __l, const slist& __r) - { - return static_cast<const __base_type&>(__l) == - static_cast<const __base_type&>(__r); - } - - _LIBCPP_INLINE_VISIBILITY - size_type size() const { return _VSTD::distance(begin(), end()); } - - iterator previous(iterator __pos); - const_iterator previous(const_iterator __pos); - - _LIBCPP_INLINE_VISIBILITY - iterator insert(iterator __pos, const _Tp& __x) { return insert_after(previous(__pos), __x); } - template <class _InputIterator> - _LIBCPP_INLINE_VISIBILITY - void insert(iterator __pos, _InputIterator __f, _InputIterator __l) { return insert_after(previous(__pos), __f, __l); } - _LIBCPP_INLINE_VISIBILITY - void insert(iterator __pos, size_type __n, const _Tp& __x) { return insert_after(previous(__pos), __n, __x); } - - _LIBCPP_INLINE_VISIBILITY - iterator erase(iterator __pos) { return erase_after(previous(__pos)); } - _LIBCPP_INLINE_VISIBILITY - iterator erase(iterator __f, iterator __l) { return erase_after(previous(__f), previous(__l)); } -}; - -template <class _Tp, class _Alloc> -inline _LIBCPP_INLINE_VISIBILITY -typename slist<_Tp, _Alloc>::iterator slist<_Tp, _Alloc>::previous(iterator __pos) -{ - iterator __a = begin(), __b = begin(); - while (++__a != __pos) - ++__b; - return __b; -} - -template <class _Tp, class _Alloc> -inline _LIBCPP_INLINE_VISIBILITY -typename slist<_Tp, _Alloc>::const_iterator slist<_Tp, _Alloc>::previous(const_iterator __pos) -{ - iterator __a = begin(), __b = begin(); - while (++__a != __pos) - ++__b; - return __b; -} - -} - -#endif |