Skip to content

Commit

Permalink
It seems that AppleClang has <format> but not std::format_string
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Jun 15, 2024
1 parent e4046b9 commit 3552d10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jngl/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// @file
#pragma once

#if __has_include(<format>)
#if __has_include(<format>) && !defined(__APPLE__)
#include <format>
#endif
#include <string>
Expand All @@ -13,7 +13,7 @@ namespace jngl {

void trace(const std::string&);

#if __has_include(<format>)
#if __has_include(<format>) && !defined(__APPLE__)
template <class... Args> void trace(std::format_string<Args...> format, Args&&... args) {
return trace(std::format(std::move(format), std::forward<Args>(args)...));
}
Expand All @@ -23,7 +23,7 @@ template <class... Args> void trace(Args&&... args) {}

void warn(const std::string&);

#if __has_include(<format>)
#if __has_include(<format>) && !defined(__APPLE__)
template <class... Args> void warn(std::format_string<Args...> format, Args&&... args) {
return warn(std::format(std::move(format), std::forward<Args>(args)...));
}
Expand Down

0 comments on commit 3552d10

Please sign in to comment.