I'm working on a custom library. So far, I've wrapped std::tuple and std::tie into my own myOwn::Tuple and myOwn::tie. They function the same way that std::tuple and std::tie do. I'd like to do something similar with std::ignore.
So far, I've written the following:
namespace myOwn
{
auto
tilde()
-> decltype(std::ignore)
{
return std::ignore;
}
}
My only issue is that I now have to use myOwn::tilde() with parentheses. I'd like to be able to use this as myOwn::tilde. So far, all I've read on std::ignore is how to use it,
Here: Possible implementations of std::ignore
Here: Requirements for std::ignore
And here: C++: Return type of std::tie with std::ignore
I've tried using
typedef std::ignore tilde
but this was not successful. Any help would be appreciated. This question could useful to anyone else trying to wrap objects.
Aucun commentaire:
Enregistrer un commentaire