Skip to content

Commit 9dd77dc

Browse files
baruchsiachcdunn2001
authored andcommitted
Revert "Use std namespace for snprintf."
This reverts commit 1c58876. std::snprintf() is only available in C++11, which is not provided by all compilers. Since the C library snprintf() can easily be used as a replacement on Linux systems, this patch changes jsoncpp to use the C library snprintf() instead of C++11 std::snprintf(), fixing the build error below: src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std' See open-source-parsers#231, open-source-parsers#224, and open-source-parsers#218.
1 parent 244b149 commit 9dd77dc

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/lib_json/json_writer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
3131
#define snprintf _snprintf
32-
#else
33-
#define snprintf std::snprintf
3432
#endif
3533

3634
#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0

0 commit comments

Comments
 (0)