18#ifndef _LOG4CXX_HELPERS_WIDELIFE_H
19#define _LOG4CXX_HELPERS_WIDELIFE_H
21#include <log4cxx/log4cxx.h>
36 template <
class... Args>
39 new(&storage) T(std::forward<Args>(args)...);
44#if LOG4CXX_EVENTS_AT_EXIT
53 return *
reinterpret_cast<T*
>(&storage);
58 return *
reinterpret_cast<const T*
>(&storage);
66 operator const T&()
const
72 alignas(T)
char storage[
sizeof(T)];
The WideLife wrapper is destined to prolongate the runtime logger state lifetime from static duration...
Definition: widelife.h:34
const T & value() const
Definition: widelife.h:56
~WideLife()
Definition: widelife.h:42
WideLife(Args &&... args)
Definition: widelife.h:37
T & value()
Definition: widelife.h:51
Definition: configuration.h:25