Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

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> 
    constexpr auto 
    empty() noexcept(noexcept(std::declval< D & >().begin()==std::declval< D & >().end()));
  template<typename D = Derived> 
    constexpr auto 
    empty() const noexcept(noexcept(std::declval< D const & >().begin()==std::declval< D const & >().end()));
  template<typename D = Derived, 
           typename R = decltype(std::declval<D &>().empty())> 
    explicit constexpr 
    operator bool() noexcept(noexcept(std::declval< D & >().empty()));
  template<typename D = Derived, 
           typename R = decltype(std::declval<D const &>().empty())> 
    explicit constexpr 
    operator bool() const noexcept(noexcept(std::declval< D const & >().empty()));
  template<typename D = Derived, element_layout C = Contiguity, 
           typename Enable = std::enable_if_t<C == element_layout::contiguous> > 
    constexpr auto data() noexcept(noexcept(std::declval< D & >().begin()));
  template<typename D = Derived, element_layout C = Contiguity, 
           typename Enable = std::enable_if_t<C == element_layout::contiguous> > 
    constexpr auto 
    data() const noexcept(noexcept(std::declval< D const & >().begin()));
  template<typename D = Derived> 
    constexpr auto 
    size() noexcept(noexcept(std::declval< D & >().end() - std::declval< D & >().begin()));
  template<typename D = Derived> 
    constexpr auto 
    size() const noexcept(noexcept(std::declval< D const & >().end() - std::declval< D const & >().begin()));
  template<typename D = Derived> 
    constexpr auto front() noexcept(noexcept(*std::declval< D & >().begin()));
  template<typename D = Derived> 
    constexpr auto 
    front() const noexcept(noexcept(*std::declval< D const & >().begin()));
  template<typename D = Derived, 
           typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> > 
    constexpr auto 
    back() noexcept(noexcept(*std::prev(std::declval< D & >().end())));
  template<typename D = Derived, 
           typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> > 
    constexpr auto 
    back() const noexcept(noexcept(*std::prev(std::declval< D const & >().end())));
  template<typename D = Derived> 
    constexpr auto 
    operator[](v1_dtl::range_difference_t< D >) noexcept(noexcept(std::declval< D & >().begin()[n]));
  template<typename D = Derived> 
    constexpr auto 
    operator[](v1_dtl::range_difference_t< D >) const noexcept(noexcept(std::declval< D const & >().begin()[n]));
};

Description

view_interface public member functions

  1. template<typename D = Derived> 
      constexpr auto 
      empty() noexcept(noexcept(std::declval< D & >().begin()==std::declval< D & >().end()));
  2. template<typename D = Derived> 
      constexpr auto 
      empty() const noexcept(noexcept(std::declval< D const & >().begin()==std::declval< D const & >().end()));
  3. template<typename D = Derived, 
             typename R = decltype(std::declval<D &>().empty())> 
      explicit constexpr 
      operator bool() noexcept(noexcept(std::declval< D & >().empty()));
  4. template<typename D = Derived, 
             typename R = decltype(std::declval<D const &>().empty())> 
      explicit constexpr 
      operator bool() const noexcept(noexcept(std::declval< D const & >().empty()));
  5. template<typename D = Derived, element_layout C = Contiguity, 
             typename Enable = std::enable_if_t<C == element_layout::contiguous> > 
      constexpr auto data() noexcept(noexcept(std::declval< D & >().begin()));
  6. template<typename D = Derived, element_layout C = Contiguity, 
             typename Enable = std::enable_if_t<C == element_layout::contiguous> > 
      constexpr auto 
      data() const noexcept(noexcept(std::declval< D const & >().begin()));
  7. template<typename D = Derived> 
      constexpr auto 
      size() noexcept(noexcept(std::declval< D & >().end() - std::declval< D & >().begin()));
  8. template<typename D = Derived> 
      constexpr auto 
      size() const noexcept(noexcept(std::declval< D const & >().end() - std::declval< D const & >().begin()));
  9. template<typename D = Derived> 
      constexpr auto front() noexcept(noexcept(*std::declval< D & >().begin()));
  10. template<typename D = Derived> 
      constexpr auto 
      front() const noexcept(noexcept(*std::declval< D const & >().begin()));
  11. template<typename D = Derived, 
             typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> > 
      constexpr auto 
      back() noexcept(noexcept(*std::prev(std::declval< D & >().end())));
  12. template<typename D = Derived, 
             typename Enable = std::enable_if_t< v1_dtl::decrementable_sentinel<D>::value && v1_dtl::common_range<D>::value> > 
      constexpr auto 
      back() const noexcept(noexcept(*std::prev(std::declval< D const & >().end())));
  13. template<typename D = Derived> 
      constexpr auto 
      operator[](v1_dtl::range_difference_t< D > n) noexcept(noexcept(std::declval< D & >().begin()[n]));
  14. template<typename D = Derived> 
      constexpr auto 
      operator[](v1_dtl::range_difference_t< D > n) const noexcept(noexcept(std::declval< D const & >().begin()[n]));

PrevUpHomeNext