18#ifndef _LOG4CXX_HELPERS_WIDELIFE_H
19#define _LOG4CXX_HELPERS_WIDELIFE_H
22#if defined(__cpp_concepts) && __cpp_concepts >= 201500
43 template <
class Arg0,
class... Args>
44#if defined(__cpp_concepts) && __cpp_concepts >= 201500
45 requires (!std::same_as<WideLife, Arg0>)
49 new(&storage) T(std::forward<Arg0>(arg0), std::forward<Args>(args)...);
54#if LOG4CXX_EVENTS_AT_EXIT
63 return *
reinterpret_cast<T*
>(&storage);
68 return *
reinterpret_cast<const T*
>(&storage);
76 operator const T&()
const
82 alignas(T)
char storage[
sizeof(T)];
The WideLife wrapper is destined to prolongate the runtime logger state lifetime from static duration...
Definition: widelife.h:37
WideLife(Arg0 &&arg0, Args &&... args)
Definition: widelife.h:47
WideLife()
Definition: widelife.h:39
const T & value() const
Definition: widelife.h:66
~WideLife()
Definition: widelife.h:52
T & value()
Definition: widelife.h:61
#define LOG4CXX_NS
Definition: log4cxx.h:104