ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::range_with_conv< RANGE > Class Template Reference

Add to a range class conversions to containers. More...

#include <range_with_conv.h>

Inheritance diagram for CxxUtils::range_with_conv< RANGE >:
Collaboration diagram for CxxUtils::range_with_conv< RANGE >:

Public Types

using Elt_t = std::ranges::range_value_t<RANGE>

Public Member Functions

template<template< class, class > class CONT, class ALLOC>
 operator CONT< Elt_t, ALLOC > () const
 Implicit conversion of the range to a container.
std::vector< Elt_tasVector () const
 Explicit conversion to a vector.

Detailed Description

template<class RANGE>
class CxxUtils::range_with_conv< RANGE >

Add to a range class conversions to containers.

Definition at line 28 of file range_with_conv.h.

Member Typedef Documentation

◆ Elt_t

template<class RANGE>
using CxxUtils::range_with_conv< RANGE >::Elt_t = std::ranges::range_value_t<RANGE>

Definition at line 33 of file range_with_conv.h.

Member Function Documentation

◆ asVector()

template<class RANGE>
std::vector< Elt_t > CxxUtils::range_with_conv< RANGE >::asVector ( ) const
inline

Explicit conversion to a vector.

For use from Python.

Definition at line 49 of file range_with_conv.h.

50 {
51 return *this;
52 }

◆ operator CONT< Elt_t, ALLOC >()

template<class RANGE>
template<template< class, class > class CONT, class ALLOC>
CxxUtils::range_with_conv< RANGE >::operator CONT< Elt_t, ALLOC > ( ) const
inline

Implicit conversion of the range to a container.

Definition at line 40 of file range_with_conv.h.

41 {
42 return CONT<Elt_t, ALLOC> (this->begin(), this->end());
43 }
Add to a range class conversions to containers.
auto end(range_with_at< T > &s)
auto begin(range_with_at< T > &s)

The documentation for this class was generated from the following file: