Fix compiling with GCC
Template specializations produced by the macros apparently must be in the same namespace for GCC (not sure whether this is actually enforced by the standard).
This commit is contained in:
parent
7e649fe2bf
commit
712eb4fb28
|
@ -3,18 +3,20 @@
|
|||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
using namespace ReflectiveRapidJSON;
|
||||
|
||||
// treat some types differently to test Treat... traits
|
||||
struct Foo {
|
||||
};
|
||||
struct Bar {
|
||||
};
|
||||
namespace ReflectiveRapidJSON {
|
||||
REFLECTIVE_RAPIDJSON_TREAT_AS_MAP_OR_HASH(Foo);
|
||||
REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_MAP_OR_HASH(Foo);
|
||||
REFLECTIVE_RAPIDJSON_TREAT_AS_SET(Bar);
|
||||
REFLECTIVE_RAPIDJSON_TREAT_AS_MULTI_SET(Foo);
|
||||
} // namespace ReflectiveRapidJSON
|
||||
|
||||
using namespace std;
|
||||
using namespace ReflectiveRapidJSON;
|
||||
|
||||
// test traits
|
||||
static_assert(IsArray<vector<int>>::value, "vector mapped to array");
|
||||
|
|
Loading…
Reference in New Issue