Skip to content

Commit dd53a96

Browse files
committed
fix: Fix :p format specifier issue
1 parent 5bee223 commit dd53a96

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

CMakeLists.txt

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5.0)
2-
project(efp_logger VERSION 0.1.0 LANGUAGES C CXX)
2+
project(efp_logger VERSION 0.1.0 LANGUAGES CXX)
33

44
set(CMAKE_CXX_STANDARD 11)
55
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
@@ -10,8 +10,17 @@ include(CPack)
1010

1111
include(cmake/CPM.cmake)
1212

13-
CPMAddPackage("gh:cwahn/efp#v0.1.0-rc.3")
14-
CPMAddPackage("gh:fmtlib/fmt#10.2.1")
13+
CPMAddPackage(
14+
NAME efp
15+
VERSION 0.1.0-rc.3
16+
URL "https://github.com/cwahn/efp/archive/refs/tags/v0.1.0-rc.3.tar.gz"
17+
)
18+
19+
CPMAddPackage(
20+
NAME fmt
21+
VERSION 10.2.1
22+
URL "https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.tar.gz"
23+
)
1524

1625
add_library(efp_logger INTERFACE)
1726
target_include_directories(efp_logger INTERFACE include)

example/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
add_executable(efp_logger_example efp_logger_example.cpp)
22
target_link_libraries(efp_logger_example PRIVATE efp_logger)
33

4-
add_executable(efp_logger_benchmark benchmark.cpp)
4+
add_executable(efp_logger_benchmark efp_logger_benchmark.cpp)
55
target_link_libraries(efp_logger_benchmark PRIVATE efp_logger)
File renamed without changes.

example/efp_logger_example.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main() {
2121

2222
// Use the logging functions
2323
trace("This is a trace message with no formating");
24-
debug("This is a debug message with a pointer: {}", (void*)&x);
24+
debug("This is a debug message with a pointer: {:p}", (void*)&x);
2525
info("This is a info message with a float: {}", 3.14f);
2626
warn("This is a warn message with a int: {}", 42);
2727
error("This is a error message with a string literal: {}", "error");

include/efp/logger.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace efp {
139139

140140
template <typename A>
141141
inline Unit enqueue_arg(A a) {
142-
_write_buffer->push_back(a);
142+
_write_buffer->push_back(detail::LogData{efp::forward<A>(a)});
143143
return unit;
144144
}
145145

@@ -358,7 +358,7 @@ namespace efp {
358358
_run.store(false);
359359

360360
if (_thread.joinable())
361-
_thread.join();
361+
_thread.join();
362362

363363
#if EFP_LOG_TIME_STAMP == true
364364
process_with_time();

0 commit comments

Comments
 (0)