Skip to content

Commit

Permalink
Fixed regress
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Jan 19, 2024
1 parent c0bf731 commit fe761b2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
49 changes: 32 additions & 17 deletions source/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,23 +240,38 @@ namespace Langulus::Logger
///
LANGULUS_API(LOGGER) extern Interface Instance;

decltype(auto) Line(auto&&...) noexcept;
decltype(auto) Append(auto&&...) noexcept;

decltype(auto) Section(auto&&...) noexcept;

decltype(auto) Fatal(auto&&...) noexcept;
decltype(auto) Error(auto&&...) noexcept;
decltype(auto) Warning(auto&&...) noexcept;
decltype(auto) Verbose(auto&&...) noexcept;
decltype(auto) Info(auto&&...) noexcept;
decltype(auto) Message(auto&&...) noexcept;
decltype(auto) Special(auto&&...) noexcept;
decltype(auto) Flow(auto&&...) noexcept;
decltype(auto) Input(auto&&...) noexcept;
decltype(auto) Network(auto&&...) noexcept;
decltype(auto) OS(auto&&...) noexcept;
decltype(auto) Prompt(auto&&...) noexcept;
template<class...T>
decltype(auto) Line(T&&...) noexcept;
template<class...T>
decltype(auto) Append(T&&...) noexcept;

template<class...T>
decltype(auto) Section(T&&...) noexcept;

template<class...T>
decltype(auto) Fatal(T&&...) noexcept;
template<class...T>
decltype(auto) Error(T&&...) noexcept;
template<class...T>
decltype(auto) Warning(T&&...) noexcept;
template<class...T>
decltype(auto) Verbose(T&&...) noexcept;
template<class...T>
decltype(auto) Info(T&&...) noexcept;
template<class...T>
decltype(auto) Message(T&&...) noexcept;
template<class...T>
decltype(auto) Special(T&&...) noexcept;
template<class...T>
decltype(auto) Flow(T&&...) noexcept;
template<class...T>
decltype(auto) Input(T&&...) noexcept;
template<class...T>
decltype(auto) Network(T&&...) noexcept;
template<class...T>
decltype(auto) OS(T&&...) noexcept;
template<class...T>
decltype(auto) Prompt(T&&...) noexcept;

} // namespace Langulus::Logger

Expand Down
9 changes: 5 additions & 4 deletions source/Logger.inl
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ namespace Langulus::Logger
/// Dereference anything sparse, and route it through the logger again
/// @param anything - pointer to stringify
/// @return a reference to the logger for chaining
template<CT::Sparse T> LANGULUS(INLINED)
A::Interface& A::Interface::operator << (const T& sparse) noexcept {
LANGULUS(INLINED)
A::Interface& A::Interface::operator << (const CT::Sparse auto& sparse) noexcept {
using T = Deref<decltype(sparse)>;
if constexpr (CT::BuiltinCharacter<T>) {
Write(sparse);
return *this;
Expand All @@ -176,8 +177,8 @@ namespace Langulus::Logger
/// Stringify anything that has a valid fmt formatter
/// @param anything - type to stringify
/// @return a reference to the logger for chaining
template<::Langulus::Logger::Formattable T> LANGULUS(INLINED)
A::Interface& A::Interface::operator << (const T& anything) noexcept {
LANGULUS(INLINED)
A::Interface& A::Interface::operator << (const ::Langulus::Logger::Formattable auto& anything) noexcept {
Write(fmt::format("{}", anything));
return *this;
}
Expand Down

0 comments on commit fe761b2

Please sign in to comment.