libhatchet
Loading...
Searching...
No Matches
hxref.hpp File Reference

Go to the source code of this file.

Classes

class  hxref< T >
class  hxkey_equal_t< hxref< T > >
class  hxkey_hash_t< hxref< T > >

Functions

template<typename T, typename U_ = T, hxenable_if_t< hxbinds_directly< T, U_ >(), bool > = true>
hxref< T > hxmake_ref (U_ &value_)

Detailed Description

An optional reference type.

Implements std::optional<T&>.

Function Documentation

◆ hxmake_ref()

template<typename T, typename U_ = T, hxenable_if_t< hxbinds_directly< T, U_ >(), bool > = true>
hxref< T > hxmake_ref ( U_ & value_)

hxmake_ref<T> - Returns an hxref<T> bound to value.

U& must bind to T& without creating a temporary.

  • value : The lvalue to reference.