0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::util: Add basic STL map transformation functors.

This commit is contained in:
Jason Volk 2017-04-06 17:45:50 -07:00
parent 229a222ff6
commit 8955328479

View file

@ -559,6 +559,29 @@ at(It &&start,
}
//
// Some functors for STL
//
template<class container>
struct keys
{
auto &operator()(typename container::reference v) const
{
return v.first;
}
};
template<class container>
struct values
{
auto &operator()(typename container::reference v) const
{
return v.second;
}
};
//
// Customized std::string_view (experimental TS / C++17)
//