- Array index can be passed as int to operator[], allowing use of literal:

Json::Value array;
  array.append( 1234 );
  int value = array[0].asInt();  // did not compile previously
This commit is contained in:
Baptiste Lepilleur
2010-12-24 12:47:14 +00:00
parent e6046e589e
commit fa130ef871
6 changed files with 56 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ namespace JsonTest {
/// JSONTEST_ASSERT( x == y ) << "x=" << x << ", y=" << y;
/// JSONTEST_ASSERT( x == y );
#define JSONTEST_ASSERT( expr ) \
if ( condition ) \
if ( expr ) \
{ \
} \
else \