Skip to content

Commit ae0c1d3

Browse files
committed
Fix multiple definition of show_c_string.
1 parent 9622a88 commit ae0c1d3

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ set(CMAKE_CXX_EXTENSIONS OFF)
2929

3030
include_directories(${Boost_INCLUDE_DIRS})
3131

32-
add_executable(test_exec test.cpp)
32+
add_executable(test_exec test.cpp test_2.cpp)
3333
add_test(NAME test COMMAND test_exec)

icecream.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555

5656
#define ICECREAM_MAJOR_VERSION 0
5757
#define ICECREAM_MINOR_VERSION 3
58-
#define ICECREAM_PATCH_VERSION 0
59-
#define ICECREAM_LIB_VERSION "0.3.0"
58+
#define ICECREAM_PATCH_VERSION 1
59+
#define ICECREAM_LIB_VERSION "0.3.1"
6060

6161

6262
#if defined(__GNUC__)
@@ -1294,7 +1294,7 @@ namespace icecream{ namespace detail
12941294
}
12951295
};
12961296

1297-
auto show_c_string() -> bool
1297+
inline auto show_c_string() -> bool
12981298
{
12991299
return Icecream::instance().show_c_string_;
13001300
}

test_2.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Header used to catch multiple symbol definition
2+
3+
#include "icecream.hpp"

0 commit comments

Comments
 (0)