Blaze 3.9
Classes
UnsignedValue.h File Reference

Header file for the UnsignedValue class. More...

#include <iosfwd>
#include <blaze/util/constraints/Unsigned.h>

Go to the source code of this file.

Classes

class  blaze::UnsignedValue< T >
 Implementation of a wrapper for built-in unsigned integral values. More...
 

Functions

UnsignedValue operators
template<typename T1 , typename T2 >
bool blaze::operator== (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Equality comparison between two UnsignedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator!= (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Inequality comparison between two UnsignedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator< (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Less-than comparison between two UnsignedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator> (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Greater-than comparison between two UnsignedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator<= (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Less-or-equal-than comparison between two UnsignedValue objects. More...
 
template<typename T1 , typename T2 >
bool blaze::operator>= (const UnsignedValue< T1 > &lhs, const UnsignedValue< T2 > &rhs)
 Greater-or-equal-than comparison between two UnsignedValue objects. More...
 
template<typename T >
std::ostream & blaze::operator<< (std::ostream &os, const UnsignedValue< T > &uv)
 Global output operator for the UnsignedValue wrapper. More...
 
template<typename T >
std::istream & blaze::operator>> (std::istream &is, UnsignedValue< T > &uv)
 Global input operator for the UnsignedValue wrapper. More...
 

Detailed Description

Header file for the UnsignedValue class.

Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved

This file is part of the Blaze library. You can redistribute it and/or modify it under the terms of the New (Revised) BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the names of the Blaze development group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ operator!=()

template<typename T1 , typename T2 >
bool blaze::operator!= ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Inequality comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the two values are not equal, true if they are equal.

◆ operator<()

template<typename T1 , typename T2 >
bool blaze::operator< ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Less-than comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the left value is less than the right value, false if not.

◆ operator<<()

template<typename T >
std::ostream & blaze::operator<< ( std::ostream &  os,
const UnsignedValue< T > &  uv 
)
inline

Global output operator for the UnsignedValue wrapper.

Parameters
osReference to the output stream.
uvReference to a UnsignedValue object.
Returns
The output stream.

◆ operator<=()

template<typename T1 , typename T2 >
bool blaze::operator<= ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Less-or-equal-than comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the left value is less or equal than the right value, false if not.

◆ operator==()

template<typename T1 , typename T2 >
bool blaze::operator== ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Equality comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the two values are equal, false if not.

◆ operator>()

template<typename T1 , typename T2 >
bool blaze::operator> ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Greater-than comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the left value if greater than the right value, false if not.

◆ operator>=()

template<typename T1 , typename T2 >
bool blaze::operator>= ( const UnsignedValue< T1 > &  lhs,
const UnsignedValue< T2 > &  rhs 
)
inline

Greater-or-equal-than comparison between two UnsignedValue objects.

Parameters
lhsThe left-hand side UnsignedValue wrapper.
rhsThe right-hand side UnsignedValue wrapper.
Returns
true if the left value is greater or equal than the right value, false if not.

◆ operator>>()

template<typename T >
std::istream & blaze::operator>> ( std::istream &  is,
UnsignedValue< T > &  uv 
)

Global input operator for the UnsignedValue wrapper.

Parameters
isReference to the input stream.
uvReference to a UnsignedValue object.
Returns
The input stream.

The input operator guarantees that this object is not changed in the case of an input error. Only values suitable for the according built-in unsigned integral data type T are allowed. Otherwise, the input stream's position is returned to its previous position and the std::istream::failbit is set.