| Home | Libraries | People | FAQ | More

## Struct template view_interface

boost::stl_interfaces::view_interface

## Synopsis

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

    template<typename Derived, element_layout Contiguity>
    struct view_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,
               typename R = decltype(std::declval<D &>().empty())>
        explicit constexpr operator bool();
      template<typename D = Derived,
               typename R = decltype(std::declval<D const &>().empty())>
        explicit constexpr operator bool() 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(std::declval< D & >().end() - std::declval< D & >().begin())
        size();
      template<typename D = Derived>
        decltype(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,
               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(std::declval< D & >().begin()[n])
        operator[](v1_dtl::range_difference_t< D >);
      template<typename D = Derived>
        decltype(std::declval< D const & >().begin()[n])
        operator[](v1_dtl::range_difference_t< D >) const;
    };

## Description

### `view_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,
                typename R = decltype(std::declval<D &>().empty())>
         explicit constexpr operator bool();

4.     template<typename D = Derived,
                typename R = decltype(std::declval<D const &>().empty())>
         explicit constexpr operator bool() const;

5.     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();

6.     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;

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

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

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

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

11.     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();

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 const & >().end())) back() const;

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

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