4.6.0
Freundlich's C++ toolkit
|
Reference wrappers for incomplete types.
Classes | |
struct | fcppt::is_reference< Type > |
Tests if a type is an fcppt::reference. More... | |
class | fcppt::reference< Type > |
A simple reference wrapper that supports incomplete types. More... | |
struct | fcppt::reference_hash< fcppt::reference< Type > > |
A hash for fcppt::reference that hashes pointers. More... | |
Functions | |
template<typename Type > | |
fcppt::reference< Type const > | fcppt::make_cref (Type const &_ref) noexcept |
Convenience function to create const references. | |
template<typename Type > | |
fcppt::reference< Type > | fcppt::make_ref (Type &_ref) noexcept |
Convenience function to create references. | |
template<typename T > | |
bool | fcppt::operator== (fcppt::reference< T > const &_a, fcppt::reference< T > const &_b) noexcept |
Compares two references for equality. | |
template<typename T > | |
bool | fcppt::operator!= (fcppt::reference< T > const &_a, fcppt::reference< T > const &_b) noexcept |
Compares two references for inequality. | |
template<typename T > | |
bool | fcppt::operator< (fcppt::reference< T > const &_a, fcppt::reference< T > const &_b) noexcept |
Compares two references lexicographically. | |
template<typename T , typename Ch , typename Traits > | |
std::basic_ostream< Ch, Traits > & | fcppt::operator<< (std::basic_ostream< Ch, Traits > &_stream, fcppt::reference< T > const &_ref) |
Outputs a reference wrapper to a stream. | |
template<typename Base , typename Type > | |
fcppt::reference< Base > | fcppt::reference_to_base (fcppt::reference< Type > const _ref) noexcept |
Converts a reference to a base class. | |
template<typename Type > | |
fcppt::reference< Type const > | fcppt::reference_to_const (fcppt::reference< Type > const _ref) noexcept |
Converts a reference to a const reference. | |
|
inlinenoexcept |
Convenience function to create const references.
|
inlinenoexcept |
Convenience function to create references.
|
noexcept |
Compares two references for inequality.
Compares _a and _b for inequality. Equal to !(_a == _b)
.
_a | The first reference |
_b | The second reference |
|
noexcept |
Compares two references lexicographically.
Compares _a and _b lexicographically by comparing the stored pointers via std::less
.
_a | The first reference |
_b | The second reference |
std::basic_ostream< Ch, Traits > & fcppt::operator<< | ( | std::basic_ostream< Ch, Traits > & | _stream, |
fcppt::reference< T > const & | _ref ) |
Outputs a reference wrapper to a stream.
|
noexcept |
Compares two references for equality.
Compares _a and _b for equality. Two references are equal if they refer to the same object.
_a | The first reference |
_b | The second reference |
|
inlinenoexcept |
Converts a reference to a base class.
Base | Must be a base class of Type |
|
inlinenoexcept |
Converts a reference to a const reference.
Type | Must not be const |