udp/json-parser — Issue #5: _json_value::_none never initialized
Author: EmielM
Created: 2012-02-20 21:56:11+00:00
State: open

When using the c++ glue of the library, the _json_value::_none static const seems to be only declared in the header, and never initialized. As a consequence, (some?) compilers do not add the constant to the object file.

Undefined symbols:
"_json_value::_none", referenced from:
_json_value::operator[](char const*) constin indexer.o
_json_value::operator[](char const*) constin indexer.o

Stuff compiles when adding the following to the .c:

#ifdef __cplusplus
const _json_value _json_value::_none;
#endif

However, I am uncertain if these imply the correct initialization semantics of the constant at hand, so I did not make a pull request :). It seems to work for me, but suggestions on a (better/real) fix are welcome.

Keep up the good work!