Comments (7)
spdlog does not recognize that the compiler supports std::format_string
, so it uses std::string_view
as the format
argument.
spdlog/include/spdlog/common.h
Lines 145 to 156 in 73e2e02
C++23 is required because std::format_string
is a C++23 feature.
I think you have not enabled it with compiler flags.
from spdlog.
Thanks @tt4g, it seems as if, even with c++23 set, __cpp_lib_format
is set to 202106
with libstdc++13.1 and undefined with libc++-17. I'm on PopOS 22.04 so some packages may be a little behind, but these are the latest packages I can seem to find.
from spdlog.
It seems if I manually define __cpp_lib_format
to 202207L
with libc++-17 it works fine, however this is really not a permanent solution.
from spdlog.
__cpp_lib_format >= 202207L
should be a prerequisite for std::format_string
support.
See __cpp_lib_format
section in Feature testing - cppreference.com and P2508R1.
The fact that it is 202106
means that the compiler does not support std::format_string
, so using std::format_string
in Log::PrintMessage
is a mistake.
from spdlog.
It seems if I manually define
__cpp_lib_format
to202207L
with libc++-17 it works fine, however this is really not a permanent solution.
If so, it may be a compiler bug.
Please report it to the compiler maintainer.
from spdlog.
It seems if I manually define
__cpp_lib_format
to202207L
with libc++-17 it works fine, however this is really not a permanent solution.If so, it may be a compiler bug. Please report it to the compiler maintainer.
After some more digging, it seems it isn't a mistake/it is known to be undefined, https://libcxx.llvm.org/FeatureTestMacroTable.html
from spdlog.
spdlog cannot use the feature that the compiler does not support.
You should not use std::format_string
.
from spdlog.
Related Issues (20)
- latency HOT 5
- clang-tidy reports about uninitialized members HOT 2
- wstr_to_utf8buf throw exception HOT 1
- Sdplog thread in synchronous mode HOT 4
- In class backtracer do we rellay need variable enabled_ be atomic? HOT 3
- spdlog build on android,cmake config failed with fmt not founded. HOT 11
- Cannot build on Windows with Visual Studio HOT 1
- Can't log to file asynchronously HOT 1
- flush policy HOT 4
- Lambda Expression Does Not Compile in GCC 4.8.1 Version HOT 13
- Single header version? HOT 1
- I am fellowing Cherno Hazel Engine,and I have include spdlog.h, but spdlog seems has some problem HOT 8
- spdlog for DSP HOT 6
- Compile-time check bypassed due to overloading. HOT 10
- Custom pattern for log and severity level HOT 2
- sometimes print the log, and sometimes it don't. HOT 4
- Does spdlog support printf style logging? HOT 1
- 'parse': is not a member of 'fmt::v9::detail::fallback_formatter<std::basic_ostringstream<char,std::char_traits<char>,std::allocator<char>>,Char,void>' HOT 2
- Logging messages within a custom sink causes a dead lock? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spdlog.