Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Public Attributes | List of all members
seastar::lazy_deref_wrapper< T > Struct Template Reference

Detailed Description

template<typename T>
struct seastar::lazy_deref_wrapper< T >

This struct is a wrapper for lazy dereferencing a pointer.

In particular this is to be used in situations where the value of a pointer has to be converted to string in a lazy manner. Since pointers can be null adding a check at the point of calling the log function for example, will introduce an unnecessary branch in potentially useless code. Using lazy_deref this check can be deferred to the point where the code is actually evaluated.

#include <seastar/util/lazy.hh>

Public Member Functions

constexpr lazy_deref_wrapper (const T &p)
 

Public Attributes

const T & p
 

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