Skip to content

Instantly share code, notes, and snippets.

@sylveon
Created March 25, 2019 14:56
Show Gist options
  • Save sylveon/2bab6a91ee7522dc906c5a08eaddb587 to your computer and use it in GitHub Desktop.
Save sylveon/2bab6a91ee7522dc906c5a08eaddb587 to your computer and use it in GitHub Desktop.
#include <string>
#include <tuple>
#include <utility>
template<typename T, typename U>
constexpr auto operator ,(T&& a, U&& b)
{
return std::make_tuple(std::forward<T>(a), std::forward<U>(b));
}
template<typename T, typename... Args>
constexpr auto operator ,(std::tuple<Args...>&& a, T&& b)
{
return std::tuple_cat(std::forward<std::tuple<Args...>>(a), std::make_tuple(std::forward<T>(b)));
}
std::tuple<std::string, int, int> why()
{
std::string ayy = "lmao";
return ayy, 1, 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment