Skip to content

Commit a298e82

Browse files
committed
json_read_reader reads objects by member
Maybe need to revert this and have a version that does and a version that doesn't. Seems fine for everything now, and it only applies for containers, so...
1 parent 3aa1b84 commit a298e82

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/generic_factory.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,10 @@ struct T_has_do_delete<T, std::void_t<decltype( &T::do_delete )>> : std::true_ty
13891389
template<typename Derived>
13901390
class generic_typed_reader
13911391
{
1392+
public:
13921393
static constexpr bool read_objects = false;
13931394
static constexpr bool check_extend_delete_copy_from = true;
1394-
public:
1395+
13951396
template<typename C, typename Fn>
13961397
// I tried using a member function pointer and couldn't work it out
13971398
void apply_all_values( JsonValue &jv, C &container, Fn apply ) const {
@@ -1659,6 +1660,8 @@ template<typename T>
16591660
class json_read_reader : public generic_typed_reader<json_read_reader<T>>
16601661
{
16611662
public:
1663+
static constexpr bool read_objects = true;
1664+
16621665
T get_next( const JsonValue &jv ) const {
16631666
T ret;
16641667
if( !jv.read( ret ) ) {

0 commit comments

Comments
 (0)