Public Member Functions | Protected Attributes | List of all members
lar::sparse_vector< T >::const_reference Class Reference

Special little box to allow void elements to be treated as references. More...

#include <sparse_vector.h>

Inheritance diagram for lar::sparse_vector< T >::const_reference:
lar::sparse_vector< T >::reference

Public Member Functions

 const_reference (const value_type *pValue=0)
 
 const_reference (const value_type &value)
 
 operator value_type () const
 
 operator const value_type & () const
 

Protected Attributes

const value_typeptr
 

Detailed Description

template<typename T>
class lar::sparse_vector< T >::const_reference

Special little box to allow void elements to be treated as references.

Definition at line 1383 of file sparse_vector.h.

Constructor & Destructor Documentation

template<typename T>
lar::sparse_vector< T >::const_reference::const_reference ( const value_type pValue = 0)
inline

Definition at line 1387 of file sparse_vector.h.

1387 : ptr(pValue) {}
template<typename T>
lar::sparse_vector< T >::const_reference::const_reference ( const value_type value)
inline

Definition at line 1388 of file sparse_vector.h.

1388 : const_reference(&value) {}
const_reference(const value_type *pValue=0)

Member Function Documentation

template<typename T>
lar::sparse_vector< T >::const_reference::operator const value_type & ( ) const
inline

Definition at line 1391 of file sparse_vector.h.

1392  { return ptr? *ptr: value_zero; }
static constexpr value_type value_zero
a representation of 0
template<typename T>
lar::sparse_vector< T >::const_reference::operator value_type ( ) const
inlineexplicit

Definition at line 1390 of file sparse_vector.h.

1390 { return ptr? *ptr: value_zero; }
static constexpr value_type value_zero
a representation of 0

Member Data Documentation

template<typename T>
const value_type* lar::sparse_vector< T >::const_reference::ptr
protected

Definition at line 1385 of file sparse_vector.h.


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