Skip to content

Commit

Permalink
Hit a weird compile-time bug with hana::overload
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sparus committed May 6, 2024
1 parent 46d1631 commit 68aad2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions immer/extra/archive/json/json_with_archive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ struct archive_type_load
* function of just one argument.
*/
constexpr auto inject_argument = [](auto arg, auto func) {
return [arg, func](auto&& old) {
const auto is_valid = hana::is_valid(func)(old);
return [arg = std::move(arg), func = std::move(func)](auto&& old) {
const auto is_valid = hana::is_valid(func, old);
if constexpr (std::decay_t<decltype(is_valid)>::value) {
return func(old);
} else {
Expand Down

0 comments on commit 68aad2c

Please sign in to comment.