zero Class Reference

A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that are known to be zero at compile-time. 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
 Null constructible. 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), which can be used to avoid manipulating objects that are known to be zero at compile-time.

Source files
See also
Foam::one

Definition at line 61 of file zero.H.

Member Typedef Documentation

◆ value_type

typedef zero value_type

Definition at line 64 of file zero.H.

Constructor & Destructor Documentation

◆ zero() [1/2]

constexpr zero ( )
inlineconstexprnoexcept

Null constructible.

Definition at line 70 of file zero.H.

◆ zero() [2/2]

constexpr zero ( Istream )
inlineexplicitconstexprnoexcept

Construct from Istream consumes no content.

Definition at line 73 of file zero.H.

Member Function Documentation

◆ operator bool()

constexpr operator bool ( ) const
inlineconstexprnoexcept

Return false (0) for bool.

Definition at line 77 of file zero.H.

◆ operator label()

constexpr operator label ( ) const
inlineconstexprnoexcept

Return 0 for label.

Definition at line 83 of file zero.H.

◆ operator float()

constexpr operator float ( ) const
inlineconstexprnoexcept

Return 0 for float.

Definition at line 89 of file zero.H.

◆ operator double()

constexpr operator double ( ) const
inlineconstexprnoexcept

Return 0 for double.

Definition at line 95 of file zero.H.


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