Seastar
High performance C++ framework for concurrent servers
|
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 |