Skip to content

Commit

Permalink
Merge pull request #186 from jackorobot/move_schema
Browse files Browse the repository at this point in the history
Added explicit default move constructors/operators
  • Loading branch information
tristanpenman committed Dec 17, 2023
2 parents 0b4771e + 37dceaa commit 478f9a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/valijson/schema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class Schema: public Subschema
// Disable copy assignment
Schema & operator=(const Schema &) = delete;

// Default move construction
Schema(Schema &&other) = default;

// Disable copy assignment
Schema & operator=(Schema &&) = default;

/**
* @brief Clean up and free all memory managed by the Schema
*
Expand Down
6 changes: 6 additions & 0 deletions include/valijson/subschema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class Subschema
// Disable copy assignment
Subschema & operator=(const Subschema &) = delete;

// Default move construction
Subschema(Subschema &&) = default;

// Default move assignment
Subschema & operator=(Subschema &&) = default;

/**
* @brief Construct a new Subschema object
*/
Expand Down

0 comments on commit 478f9a4

Please sign in to comment.