소스 검색

refactor: require that the schema node outlives the validator

Sam Jaffe 3 달 전
부모
커밋
28774f5e80
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      include/jvalidate/validator.h

+ 2 - 0
include/jvalidate/validator.h

@@ -59,6 +59,8 @@ public:
   Validator(schema::Node const & schema, ValidationConfig const & cfg = {})
       : schema_(schema), cfg_(cfg) {}
 
+  template <typename... Args> Validator(schema::Node &&, Args &&...) = delete;
+
   /**
    * @brief Run validation on the given JSON
    *