mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 02:09:26 +08:00
packages.biu: fix inline
This commit is contained in:
@@ -19,7 +19,7 @@ namespace biu
|
|||||||
namespace common
|
namespace common
|
||||||
{
|
{
|
||||||
std::size_t hash(auto&&... objs);
|
std::size_t hash(auto&&... objs);
|
||||||
[[gnu::always_inline]] void unused(auto&&...);
|
[[gnu::always_inline]] inline void unused(auto&&...);
|
||||||
[[noreturn]] void block_forever();
|
[[noreturn]] void block_forever();
|
||||||
|
|
||||||
bool is_interactive();
|
bool is_interactive();
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ namespace biu
|
|||||||
protected: const std::chrono::time_point<std::chrono::steady_clock> CreateTime_;
|
protected: const std::chrono::time_point<std::chrono::steady_clock> CreateTime_;
|
||||||
|
|
||||||
// call log<Debug>("create {type} at {address}.");
|
// call log<Debug>("create {type} at {address}.");
|
||||||
protected: [[gnu::always_inline]] ObjectMonitor();
|
protected: [[gnu::always_inline]] inline ObjectMonitor();
|
||||||
|
|
||||||
// call log<Debug>("destroy {type} at {address} after {duration} ms.");
|
// call log<Debug>("destroy {type} at {address} after {duration} ms.");
|
||||||
protected: [[gnu::always_inline]] virtual ~ObjectMonitor();
|
protected: [[gnu::always_inline]] inline virtual ~ObjectMonitor();
|
||||||
};
|
};
|
||||||
template <typename T> friend class ObjectMonitor;
|
template <typename T> friend class ObjectMonitor;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ namespace biu
|
|||||||
|
|
||||||
// if sizeof...(Param) > 0, call log<Debug>("begin function with {arguments}.");
|
// if sizeof...(Param) > 0, call log<Debug>("begin function with {arguments}.");
|
||||||
// else call log<Debug>("begin function.");
|
// else call log<Debug>("begin function.");
|
||||||
public: template <typename... Param> [[gnu::always_inline]] explicit Guard(Param&&... param);
|
public: template <typename... Param> [[gnu::always_inline]] inline explicit Guard(Param&&... param);
|
||||||
|
|
||||||
// call log<Debug>("end function after {duration} ms.")
|
// call log<Debug>("end function after {duration} ms.")
|
||||||
public: [[gnu::always_inline]] inline virtual ~Guard();
|
public: [[gnu::always_inline]] inline virtual ~Guard();
|
||||||
@@ -74,12 +74,12 @@ namespace biu
|
|||||||
public: [[gnu::always_inline]] inline void operator()() const;
|
public: [[gnu::always_inline]] inline void operator()() const;
|
||||||
|
|
||||||
// call log<Debug>("return {return} after {duration} ms.")
|
// call log<Debug>("return {return} after {duration} ms.")
|
||||||
public: template <typename T> [[gnu::always_inline]] T rtn(T&& value) const;
|
public: template <typename T> [[gnu::always_inline]] inline T rtn(T&& value) const;
|
||||||
|
|
||||||
// print the following message if LoggerConfig_ is set and the level is higher than the level of the
|
// print the following message if LoggerConfig_ is set and the level is higher than the level of the
|
||||||
// LoggerConfig_
|
// LoggerConfig_
|
||||||
// [ {time} {thread} {indent} {filename}:{line} {function_name} ] {message}
|
// [ {time} {thread} {indent} {filename}:{line} {function_name} ] {message}
|
||||||
public: template <Level L> [[gnu::always_inline]] void log(const std::string& message) const;
|
public: template <Level L> [[gnu::always_inline]] inline void log(const std::string& message) const;
|
||||||
public: [[gnu::always_inline]] inline void error(const std::string& message) const;
|
public: [[gnu::always_inline]] inline void error(const std::string& message) const;
|
||||||
public: [[gnu::always_inline]] inline void info(const std::string& message) const;
|
public: [[gnu::always_inline]] inline void info(const std::string& message) const;
|
||||||
public: [[gnu::always_inline]] inline void debug(const std::string& message) const;
|
public: [[gnu::always_inline]] inline void debug(const std::string& message) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user