userver: userver/utils/optional_ref.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
optional_ref.hpp File Reference

Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values. More...

#include <optional>
#include <type_traits>
#include <boost/optional/optional_fwd.hpp>
#include <userver/utils/assert.hpp>
+ Include dependency graph for optional_ref.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  utils::OptionalRef< T >
 Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<class T , class U >
constexpr bool utils::operator== (OptionalRef< T > lhs, OptionalRef< U > rhs) noexcept
 
template<class T , class U >
constexpr bool utils::operator!= (OptionalRef< T > lhs, OptionalRef< U > rhs) noexcept
 

Detailed Description

Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values.

Definition in file optional_ref.hpp.