Skip to content

Commit

Permalink
fix compilation: add a return in constexpr functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo DELRIEU committed Nov 10, 2016
1 parent 2530767 commit 9ca5d9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct to_json_fn
operator()(Json&& j, T &&val) const noexcept(noexcept(to_json(std::forward<Json>(j), std::forward<T>(val))))
-> decltype(to_json(std::forward<Json>(j), std::forward<T>(val)), void())
{
to_json(std::forward<Json>(j), std::forward<T>(val));
return to_json(std::forward<Json>(j), std::forward<T>(val));
}
};

Expand All @@ -156,7 +156,7 @@ struct from_json_fn
noexcept(noexcept(from_json(std::forward<Json>(j), val)))
-> decltype(from_json(std::forward<Json>(j), val), void())
{
from_json(std::forward<Json>(j), val);
return from_json(std::forward<Json>(j), val);
}
};

Expand Down

0 comments on commit 9ca5d9c

Please sign in to comment.