| Home | Libraries | People | FAQ | More

## Struct template sequence_container_interface

boost::stl_interfaces::sequence_container_interface

## Synopsis

    // In header: <boost/stl_interfaces/sequence_container_interface.hpp>

    template<typename Derived, element_layout Contiguity>
    struct sequence_container_interface {

      // public member functions
      template<typename D = Derived>
        decltype(std::declval< D & >().begin()==std::declval< D & >().end())
        empty();
      template<typename D = Derived>
        decltype(std::declval< D const & >().begin()==std::declval< D const & >().end())
        empty() const;
      template<typename D = Derived, element_layout C = Contiguity,
               typename Enable = std::enable_if_t<C == element_layout::contiguous> >
        decltype(std::addressof(*std::declval< D & >().begin())) data();
      template<typename D = Derived, element_layout C = Contiguity,
               typename Enable = std::enable_if_t<C == element_layout::contiguous> >
        decltype(std::addressof(*std::declval< D const & >().begin()))
        data() const;
      template<typename D = Derived>
        decltype(typename D::size_type(std::declval< D & >().end() - std::declval< D & >().begin()))
        size();
      template<typename D = Derived>
        decltype(typename D::size_type(std::declval< D const & >().end() - std::declval< D const & >().begin()))
        size() const;
      template<typename D = Derived>
        decltype(*std::declval< D & >().begin()) front();
      template<typename D = Derived>
        decltype(*std::declval< D const & >().begin()) front() const;
      template<typename D = Derived>
        decltype((void) std::declval< D & >().emplace_front(x))
        push_front(typename D::value_type const &);
      template<typename D = Derived>
        decltype((void) std::declval< D & >().emplace_front(std::move(x)))
        push_front(typename D::value_type &&);
      template<typename D = Derived>
        decltype(std::declval< D & >().emplace_front(std::declval< typename D::value_type & >()),(void) std::declval< D & >().erase(std::declval< D & >().begin()))
        pop_front() noexcept;
      template<typename D = Derived,
               typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> >
        decltype(*std::prev(std::declval< D & >().end())) back();
      template<typename D = Derived,
               typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> >
        decltype(*std::prev(std::declval< D const & >().end())) back() const;
      template<typename D = Derived>
        decltype((void) std::declval< D & >().emplace_back(x))
        push_back(typename D::value_type const &);
      template<typename D = Derived>
        decltype((void) std::declval< D & >().emplace_back(std::move(x)))
        push_back(typename D::value_type &&);
      template<typename D = Derived>
        decltype(std::declval< D & >().emplace_back(std::declval< typename D::value_type >()),(void) std::declval< D & >().erase(std::prev(std::declval< D & >().end())))
        pop_back() noexcept;
      template<typename D = Derived>
        decltype(std::declval< D & >().begin()[n])
        operator[](typename D::size_type);
      template<typename D = Derived>
        decltype(std::declval< D const & >().begin()[n])
        operator[](typename D::size_type) const;
      template<typename D = Derived>
        decltype(std::declval< D & >().size(), std::declval< D & >()[i])
        at(typename D::size_type);
      template<typename D = Derived>
        decltype(std::declval< D const & >().size(), std::declval< D const & >()[i])
        at(typename D::size_type) const;
      template<typename D = Derived, typename Iter = typename D::const_iterator>
        Iter begin() const;
      template<typename D = Derived, typename Iter = typename D::const_iterator>
        Iter end() const;
      template<typename D = Derived>
        decltype(std::declval< D const & >().begin()) cbegin() const;
      template<typename D = Derived>
        decltype(std::declval< D const & >().end()) cend() const;
      template<typename D = Derived,
               typename Enable = std::enable_if_t<v1_dtl::common_range<D>::value> >
        auto rbegin();
      template<typename D = Derived,
               typename Enable = std::enable_if_t<v1_dtl::common_range<D>::value> >
        auto rend();
      template<typename D = Derived> auto rbegin() const;
      template<typename D = Derived> auto rend() const;
      template<typename D = Derived>
        decltype(std::declval< D const & >().rbegin()) crbegin() const;
      template<typename D = Derived>
        decltype(std::declval< D const & >().rend()) crend() const;
      template<typename D = Derived>
        decltype(std::declval< D & >().emplace(pos, x))
        insert(typename D::const_iterator, typename D::value_type const &);
      template<typename D = Derived>
        decltype(std::declval< D & >().emplace(pos, std::move(x)))
        insert(typename D::const_iterator, typename D::value_type &&);
      template<typename D = Derived>
        auto insert(typename D::const_iterator, typename D::size_type,
                    typename D::value_type const &);
      template<typename D = Derived>
        decltype(std::declval< D & >().insert(pos, il.begin(), il.end()))
        insert(typename D::const_iterator,
               std::initializer_list< typename D::value_type >);
      template<typename D = Derived>
        decltype(std::declval< D & >().erase(pos, std::next(pos)))
        erase(typename D::const_iterator) noexcept;
      template<typename InputIterator, typename D = Derived,
               typename Enable = std::enable_if_t<v1_dtl::in_iter<InputIterator>::value> >
        decltype(std::declval< D & >().erase(std::declval< D & >().begin(), std::declval< D & >().end()),(void) std::declval< D & >().insert(std::declval< D & >().begin(), first, last))
        assign(InputIterator, InputIterator);
      template<typename D = Derived>
        unspecified assign(typename D::size_type, typename D::value_type const &);
      template<typename D = Derived>
        decltype((void) std::declval< D & >().assign(il.begin(), il.end()))
        assign(std::initializer_list< typename D::value_type >);
      template<typename D = Derived>
        decltype(std::declval< D & >().assign(il.begin(), il.end()), std::declval< D & >())
        operator=(std::initializer_list< typename D::value_type >);
      template<typename D = Derived>
        decltype((void) std::declval< D & >().erase(std::declval< D & >().begin(), std::declval< D & >().end()))
        clear() noexcept;
    };

## Description

### `sequence_container_interface` public member functions

1.     template<typename D = Derived>
         decltype(std::declval< D & >().begin()==std::declval< D & >().end()) empty();

2.     template<typename D = Derived>
         decltype(std::declval< D const & >().begin()==std::declval< D const & >().end())
         empty() const;

3.     template<typename D = Derived, element_layout C = Contiguity,
                typename Enable = std::enable_if_t<C == element_layout::contiguous> >
         decltype(std::addressof(*std::declval< D & >().begin())) data();

4.     template<typename D = Derived, element_layout C = Contiguity,
                typename Enable = std::enable_if_t<C == element_layout::contiguous> >
         decltype(std::addressof(*std::declval< D const & >().begin())) data() const;

5.     template<typename D = Derived>
         decltype(typename D::size_type(std::declval< D & >().end() - std::declval< D & >().begin()))
         size();

6.     template<typename D = Derived>
         decltype(typename D::size_type(std::declval< D const & >().end() - std::declval< D const & >().begin()))
         size() const;

7.     template<typename D = Derived>
         decltype(*std::declval< D & >().begin()) front();

8.     template<typename D = Derived>
         decltype(*std::declval< D const & >().begin()) front() const;

9.     template<typename D = Derived>
         decltype((void) std::declval< D & >().emplace_front(x))
         push_front(typename D::value_type const & x);

10.     template<typename D = Derived>
          decltype((void) std::declval< D & >().emplace_front(std::move(x)))
          push_front(typename D::value_type && x);

11.     template<typename D = Derived>
          decltype(std::declval< D & >().emplace_front(std::declval< typename D::value_type & >()),(void) std::declval< D & >().erase(std::declval< D & >().begin()))
          pop_front() noexcept;

12.     template<typename D = Derived,
                 typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> >
          decltype(*std::prev(std::declval< D & >().end())) back();

13.     template<typename D = Derived,
                 typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> >
          decltype(*std::prev(std::declval< D const & >().end())) back() const;

14.     template<typename D = Derived>
          decltype((void) std::declval< D & >().emplace_back(x))
          push_back(typename D::value_type const & x);

15.     template<typename D = Derived>
          decltype((void) std::declval< D & >().emplace_back(std::move(x)))
          push_back(typename D::value_type && x);

16.     template<typename D = Derived>
          decltype(std::declval< D & >().emplace_back(std::declval< typename D::value_type >()),(void) std::declval< D & >().erase(std::prev(std::declval< D & >().end())))
          pop_back() noexcept;

17.     template<typename D = Derived>
          decltype(std::declval< D & >().begin()[n])
          operator[](typename D::size_type n);

18.     template<typename D = Derived>
          decltype(std::declval< D const & >().begin()[n])
          operator[](typename D::size_type n) const;

19.     template<typename D = Derived>
          decltype(std::declval< D & >().size(), std::declval< D & >()[i])
          at(typename D::size_type i);

20.     template<typename D = Derived>
          decltype(std::declval< D const & >().size(), std::declval< D const & >()[i])
          at(typename D::size_type i) const;

21.     template<typename D = Derived, typename Iter = typename D::const_iterator>
          Iter begin() const;

22.     template<typename D = Derived, typename Iter = typename D::const_iterator>
          Iter end() const;

23.     template<typename D = Derived>
          decltype(std::declval< D const & >().begin()) cbegin() const;

24.     template<typename D = Derived>
          decltype(std::declval< D const & >().end()) cend() const;

25.     template<typename D = Derived,
                 typename Enable = std::enable_if_t<v1_dtl::common_range<D>::value> >
          auto rbegin();

26.     template<typename D = Derived,
                 typename Enable = std::enable_if_t<v1_dtl::common_range<D>::value> >
          auto rend();

27.     template<typename D = Derived> auto rbegin() const;

28.     template<typename D = Derived> auto rend() const;

29.     template<typename D = Derived>
          decltype(std::declval< D const & >().rbegin()) crbegin() const;

30.     template<typename D = Derived>
          decltype(std::declval< D const & >().rend()) crend() const;

31.     template<typename D = Derived>
          decltype(std::declval< D & >().emplace(pos, x))
          insert(typename D::const_iterator pos, typename D::value_type const & x);

32.     template<typename D = Derived>
          decltype(std::declval< D & >().emplace(pos, std::move(x)))
          insert(typename D::const_iterator pos, typename D::value_type && x);

33.     template<typename D = Derived>
          auto insert(typename D::const_iterator pos, typename D::size_type n,
                      typename D::value_type const & x);

34.     template<typename D = Derived>
          decltype(std::declval< D & >().insert(pos, il.begin(), il.end()))
          insert(typename D::const_iterator pos,
                 std::initializer_list< typename D::value_type > il);

35.     template<typename D = Derived>
          decltype(std::declval< D & >().erase(pos, std::next(pos)))
          erase(typename D::const_iterator pos) noexcept;

36.     template<typename InputIterator, typename D = Derived,
                 typename Enable = std::enable_if_t<v1_dtl::in_iter<InputIterator>::value> >
          decltype(std::declval< D & >().erase(std::declval< D & >().begin(), std::declval< D & >().end()),(void) std::declval< D & >().insert(std::declval< D & >().begin(), first, last))
          assign(InputIterator first, InputIterator last);

37.     template<typename D = Derived>
          unspecified assign(typename D::size_type n,
                             typename D::value_type const & x);

38.     template<typename D = Derived>
          decltype((void) std::declval< D & >().assign(il.begin(), il.end()))
          assign(std::initializer_list< typename D::value_type > il);

39.     template<typename D = Derived>
          decltype(std::declval< D & >().assign(il.begin(), il.end()), std::declval< D & >())
          operator=(std::initializer_list< typename D::value_type > il);

40.     template<typename D = Derived>
          decltype((void) std::declval< D & >().erase(std::declval< D & >().begin(), std::declval< D & >().end()))
          clear() noexcept;