Range-v3 Range algorithms, views, and actions for the Standard Library |

Public Member Functions | List of all members
ranges::v3::safe_begin_fn Struct Reference
Core

## Public Member Functions
template<typename Rng , typename I = decltype(begin(std::declval<Rng &>()))>
constexpr meta::if_< std::is_lvalue_reference< Rng >, I, dangling< I > > | operator() (Rng &&rng) const

## Member Function Documentation

template<typename Rng , typename I = decltype(begin(std::declval<Rng &>()))>

constexpr meta::if_<std::is_lvalue_reference<Rng>, I, dangling<I> > ranges::v3::safe_begin_fn::operator() | ( | Rng && | rng | ) | const

Returns
  `begin(rng)` if `rng` is an lvalue; otherwise, it returns `begin(rng)` wrapped in `ranges::dangling`.