Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ToruNiina/toml11
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina committed Aug 11, 2024
2 parents 070fa82 + b90b5bd commit 0c83345
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions single_include/toml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9258,16 +9258,14 @@ find_or(const basic_value<TC>& v, const K& ky, T opt)

namespace detail
{
template<typename T>
T& last_one(T& arg)
{
return arg;
}
template<typename T1, typename T2, typename ...Ts>
auto last_one(T1&, T2& arg, Ts& ... args) -> decltype(last_one(arg, args...))

template<typename ...Ts>
auto last_one(Ts&&... args)
-> decltype(std::get<sizeof...(Ts)-1>(std::forward_as_tuple(std::forward<Ts>(args)...)))
{
return last_one(arg, args...);
return std::get<sizeof...(Ts)-1>(std::forward_as_tuple(std::forward<Ts>(args)...));
}

} // detail

template<typename Value, typename K1, typename K2, typename K3, typename ... Ks>
Expand Down

0 comments on commit 0c83345

Please sign in to comment.