Skip to content

Commit

Permalink
Merge pull request #59 from dkopecek/master
Browse files Browse the repository at this point in the history
Fix compilation of json_unit with GCC 5
  • Loading branch information
nlohmann committed Apr 15, 2015
2 parents 4c55ada + ad6ad4a commit 3eb1b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ clean:

# build unit tests
json_unit: test/unit.cpp src/json.hpp test/catch.hpp
$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test -Dprivate=public $< $(LDFLAGS) -o $@
$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test $< $(LDFLAGS) -o $@

# create scanner with re2c
re2c: src/json.hpp.re2c
Expand Down
7 changes: 4 additions & 3 deletions test/unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"

#include "json.hpp"
using nlohmann::json;

#include <array>
#include <deque>
#include <forward_list>
Expand All @@ -24,6 +21,10 @@ using nlohmann::json;
#include <unordered_set>
#include <vector>

#define private public
#include "json.hpp"
using nlohmann::json;

TEST_CASE("constructors")
{
SECTION("create an empty value with a given type")
Expand Down

0 comments on commit 3eb1b2a

Please sign in to comment.