Logo ROOT  
Reference Guide
BatchHelpers::BracketAdapter< T > Class Template Reference

template<class T = double>
class BatchHelpers::BracketAdapter< T >

Little adapter that gives a bracket operator to types that don't have one.

It completely ignores the index and returns a constant.

Definition at line 58 of file BatchHelpers.h.

Public Member Functions

constexpr BracketAdapter (T payload) noexcept
 
constexpr bool isBatch () const noexcept
 
constexpr operator double () const
 
constexpr double operator[] (std::size_t) const
 

Private Attributes

const T _payload
 

#include <BatchHelpers.h>

Constructor & Destructor Documentation

◆ BracketAdapter()

template<class T = double>
constexpr BatchHelpers::BracketAdapter< T >::BracketAdapter ( payload)
inlineconstexprnoexcept

Definition at line 61 of file BatchHelpers.h.

Member Function Documentation

◆ isBatch()

template<class T = double>
constexpr bool BatchHelpers::BracketAdapter< T >::isBatch ( ) const
inlineconstexprnoexcept

Definition at line 72 of file BatchHelpers.h.

◆ operator double()

template<class T = double>
constexpr BatchHelpers::BracketAdapter< T >::operator double ( ) const
inlineconstexpr

Definition at line 68 of file BatchHelpers.h.

◆ operator[]()

template<class T = double>
constexpr double BatchHelpers::BracketAdapter< T >::operator[] ( std::size_t  ) const
inlineconstexpr

Definition at line 64 of file BatchHelpers.h.

Member Data Documentation

◆ _payload

template<class T = double>
const T BatchHelpers::BracketAdapter< T >::_payload
private

Definition at line 77 of file BatchHelpers.h.


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