zero Class Reference

A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to be zero at compile-time. It is also used for tagged dispatch. More...

Inheritance diagram for zero:
[legend]

Classes

class  null
 A zero class with a null output adapter. More...
 

Public Types

typedef zero value_type
 

Public Member Functions

constexpr zero () noexcept
 Default construct. More...
 
constexpr zero (Istream &) noexcept
 Construct from Istream consumes no content. More...
 
constexpr operator bool () const noexcept
 Return false (0) for bool. More...
 
constexpr operator label () const noexcept
 Return 0 for label. More...
 
constexpr operator float () const noexcept
 Return 0 for float. More...
 
constexpr operator double () const noexcept
 Return 0 for double. More...
 

Detailed Description

A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to be zero at compile-time. It is also used for tagged dispatch.

Source files
See also
Foam::one

Definition at line 62 of file zero.H.

Member Typedef Documentation

◆ value_type

typedef zero value_type

Definition at line 66 of file zero.H.

Constructor & Destructor Documentation

◆ zero() [1/2]

constexpr zero ( )
inlineconstexprnoexcept

Default construct.

Definition at line 72 of file zero.H.

◆ zero() [2/2]

constexpr zero ( Istream )
inlineexplicitconstexprnoexcept

Construct from Istream consumes no content.

Definition at line 75 of file zero.H.

Member Function Documentation

◆ operator bool()

constexpr operator bool ( ) const
inlineconstexprnoexcept

Return false (0) for bool.

Definition at line 79 of file zero.H.

◆ operator label()

constexpr operator label ( ) const
inlineconstexprnoexcept

Return 0 for label.

Definition at line 85 of file zero.H.

◆ operator float()

constexpr operator float ( ) const
inlineconstexprnoexcept

Return 0 for float.

Definition at line 91 of file zero.H.

◆ operator double()

constexpr operator double ( ) const
inlineconstexprnoexcept

Return 0 for double.

Definition at line 97 of file zero.H.


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