one Class Reference

A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are known to be one at compile-time. More...

Inheritance diagram for one:
[legend]

Classes

class  minus
 A class representing the concept of -1. More...
 
class  null
 A one class with a null output adapter. More...
 

Public Types

typedef one value_type
 

Public Member Functions

constexpr one () noexcept
 Null constructible. More...
 
constexpr one (Istream &) noexcept
 Construct from Istream consumes no content. More...
 
constexpr operator label () const noexcept
 Return 1 for label. More...
 
constexpr operator float () const noexcept
 Return 1 for float. More...
 
constexpr operator double () const noexcept
 Return 1 for double. More...
 

Detailed Description

A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are known to be one at compile-time.

Source files
See also
Foam::zero

Definition at line 60 of file one.H.

Member Typedef Documentation

◆ value_type

typedef one value_type

Definition at line 63 of file one.H.

Constructor & Destructor Documentation

◆ one() [1/2]

constexpr one ( )
inlineconstexprnoexcept

Null constructible.

Definition at line 70 of file one.H.

Referenced by oneField::operator[]().

Here is the caller graph for this function:

◆ one() [2/2]

constexpr one ( Istream )
inlineexplicitconstexprnoexcept

Construct from Istream consumes no content.

Definition at line 73 of file one.H.

Member Function Documentation

◆ operator label()

constexpr operator label ( ) const
inlineconstexprnoexcept

Return 1 for label.

Definition at line 77 of file one.H.

◆ operator float()

constexpr operator float ( ) const
inlineconstexprnoexcept

Return 1 for float.

Definition at line 83 of file one.H.

◆ operator double()

constexpr operator double ( ) const
inlineconstexprnoexcept

Return 1 for double.

Definition at line 89 of file one.H.


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