Skip to content

Commit 2f2a951

Browse files
authored
Merge pull request #472 from beached/v3
Bugfix: tuple_size<daw::json::json_pair>'s value member was private
2 parents aed4543 + eba42f4 commit 2f2a951

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
cmake_minimum_required( VERSION 3.14 )
1010

1111
project( "daw-json-link"
12-
VERSION "3.31.0"
12+
VERSION "3.31.1"
1313
DESCRIPTION "Static JSON parsing in C++"
1414
HOMEPAGE_URL "https://github.com/beached/daw_json_link"
1515
LANGUAGES C CXX )

include/daw/json/impl/daw_json_value.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ namespace std {
106106

107107
template<daw::json::json_options_t PolicyFlags, typename Allocator>
108108
class tuple_size<daw::json::basic_json_pair<PolicyFlags, Allocator>> {
109+
public:
109110
static constexpr std::size_t value = 2;
110111
};
111112
} // namespace std

include/daw/json/impl/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
#if not defined( DAW_JSON_VER_OVERRIDE )
1818
// Should be updated when a potential ABI break is anticipated
1919
#if defined( DEBUG ) or not defined( NDEBUG )
20-
#define DAW_JSON_VER v3_31_0d
20+
#define DAW_JSON_VER v3_31_1d
2121
#else
22-
#define DAW_JSON_VER v3_31_0
22+
#define DAW_JSON_VER v3_31_1
2323
#endif
2424
#else
2525
#define DAW_JSON_VER DAW_JSON_VER_OVERRIDE

tests/src/daw_json_link_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,4 +1518,9 @@ int main( ) {
15181518
throw;
15191519
}
15201520
#endif
1521+
1522+
static_assert( std::tuple_size_v<daw::json::json_pair> == 2 );
1523+
static_assert( std::tuple_size_v<daw::json::json_pair const> == 2 );
1524+
static_assert( std::tuple_size_v<daw::json::basic_json_pair<>> == 2 );
1525+
static_assert( std::tuple_size_v<daw::json::basic_json_pair<> const> == 2 );
15211526
}

0 commit comments

Comments
 (0)