Skip to content

Commit a8afdd4

Browse files
committed
- Patch #3393345: BOOST_FOREACH compatibility. Made Json::iterator more standard compliant, added missing iterator_category and value_type typedefs (contribued by Robert A. Iannucci).
- Patch #3474563: added missing JSON_API on some classes causing link issues when building as a dynamic library on Windows (contributed by Francis Bolduc).
1 parent f92ace5 commit a8afdd4

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

NEWS.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ New in SVN
3131
representable using an Int64, or asDouble() combined with minInt64 and
3232
maxInt64 to figure out whether it is approximately representable.
3333

34+
* Value
35+
- Patch #3393345: BOOST_FOREACH compatibility. Made Json::iterator more
36+
standard compliant, added missing iterator_category and value_type
37+
typedefs (contribued by Robert A. Iannucci).
38+
39+
* Compilation
40+
41+
- Patch #3474563: added missing JSON_API on some classes causing link issues
42+
when building as a dynamic library on Windows
43+
(contributed by Francis Bolduc).
44+
3445
* Bug fixes
3546
- Patch #3539678: Copy constructor does not initialize allocated_ for stringValue
3647
(contributed by rmongia).

doc/roadmap.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
\section ms_release Makes JsonCpp ready for release
33
- Build system clean-up:
44
- Fix build on Windows (shared-library build is broken)
5+
- Compile and run tests using shared library on Windows to ensure no JSON_API macro is missing.
56
- Add enable/disable flag for static and shared library build
67
- Enhance help
78
- Platform portability check: (Notes: was ok on last check)

include/json/value.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ namespace Json {
507507

508508
/** \brief Experimental and untested: represents an element of the "path" to access a node.
509509
*/
510-
class PathArgument
510+
class JSON_API PathArgument
511511
{
512512
public:
513513
friend class Path;
@@ -540,7 +540,7 @@ namespace Json {
540540
* - ".%" => member name is provided as parameter
541541
* - ".[%]" => index is provied as parameter
542542
*/
543-
class Path
543+
class JSON_API Path
544544
{
545545
public:
546546
Path( const std::string &path,
@@ -916,9 +916,10 @@ class DefaultValueArrayAllocator : public ValueArrayAllocator
916916
/** \brief base class for Value iterators.
917917
*
918918
*/
919-
class ValueIteratorBase
919+
class JSON_API ValueIteratorBase
920920
{
921921
public:
922+
typedef std::bidirectional_iterator_tag iterator_category;
922923
typedef unsigned int size_t;
923924
typedef int difference_type;
924925
typedef ValueIteratorBase SelfType;
@@ -986,10 +987,11 @@ class DefaultValueArrayAllocator : public ValueArrayAllocator
986987
/** \brief const iterator for object and array value.
987988
*
988989
*/
989-
class ValueConstIterator : public ValueIteratorBase
990+
class JSON_API ValueConstIterator : public ValueIteratorBase
990991
{
991992
friend class Value;
992993
public:
994+
typedef const Value value_type;
993995
typedef unsigned int size_t;
994996
typedef int difference_type;
995997
typedef const Value &reference;
@@ -1044,10 +1046,11 @@ class DefaultValueArrayAllocator : public ValueArrayAllocator
10441046

10451047
/** \brief Iterator for object and array value.
10461048
*/
1047-
class ValueIterator : public ValueIteratorBase
1049+
class JSON_API ValueIterator : public ValueIteratorBase
10481050
{
10491051
friend class Value;
10501052
public:
1053+
typedef Value value_type;
10511054
typedef unsigned int size_t;
10521055
typedef int difference_type;
10531056
typedef Value &reference;

0 commit comments

Comments
 (0)