DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
UnitOrValue< T > Struct Template Reference

#include <DLG4Units.hh>

Public Member Functions

 UnitOrValue (const Unit< T > &u)
 
template<typename Scalar , typename = std::enable_if_t<std::is_arithmetic_v<Scalar>>>
 UnitOrValue (Scalar d)
 

Public Attributes

double val
 

Detailed Description

template<class T>
struct DLG4::Units::UnitOrValue< T >

Type-erases unit or value to just a value.

BYPASSES TYPE SAFETY!!

Definition at line 406 of file DLG4Units.hh.

Constructor & Destructor Documentation

◆ UnitOrValue() [1/2]

template<class T >
UnitOrValue ( const Unit< T > &  u)
inline

Definition at line 408 of file DLG4Units.hh.

408: val(u.Native()) {}

◆ UnitOrValue() [2/2]

template<class T >
template<typename Scalar , typename = std::enable_if_t<std::is_arithmetic_v<Scalar>>>
UnitOrValue ( Scalar  d)
inline

Definition at line 411 of file DLG4Units.hh.

411: val(static_cast<double>(d)) {}

Member Data Documentation

◆ val

template<class T >
double val

Definition at line 407 of file DLG4Units.hh.


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