Header file range/v3/utility/dangling.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

#include <range/v3/utility/static_const.hpp>

#include <range/v3/utility/tagged_pair.hpp>

namespace std{}

namespace ranges
{
    inline namespace v3
    {
        namespace detail
        {
            template <typename T>
            struct is_dangling
            : meta::is<T, dangling>
            {};
            
            template <typename T>
            struct is_dangling<T&>
            : is_dangling<T>
            {};
            
            template <typename T>
            struct is_dangling<T const>
            : is_dangling<T>
            {};
        }
        
        template <typename I>
        struct dangling;
        
        template <>
        struct dangling<void>
        {
            dangling() = default;
        };
        
        struct sanitize_fn;
        
        struct get_unsafe_fn;
        
        inline namespace 
        {
            constexpr auto& get_unsafe = static_const<get_unsafe_fn>::value;
        }
        
        inline namespace 
        {
            constexpr auto& sanitize = static_const<sanitize_fn>::value;
        }
    }
}

Class template ranges::v3::dangling<I>

template <typename I>
struct dangling
{
    dangling() = default;
    
    constexpr dangling(I it);
    
    constexpr I get_unsafe() const;
};

A wrapper for an iterator or a sentinel into a range that may no longer be valid.

Constructor ranges::v3::dangling<I>::dangling

constexpr dangling(I it);

Implicit converting constructor


Function ranges::v3::dangling<I>::get_unsafe

constexpr I get_unsafe() const;

destructed yet, or else the range's iterators are permitted to outlive the range, and



Variable ranges::v3::get_unsafe

constexpr auto& get_unsafe = static_const<get_unsafe_fn>::value;

ranges::dangling; otherwise, return \p t.


Variable ranges::v3::sanitize

constexpr auto& sanitize = static_const<sanitize_fn>::value;

<T> objects with <void>, introspecting \c std::pair and \c std::tuple objects recursively.<T> objects with<void>, introspecting \c std::pair and \c std::tuple