Closed BengtGustafsson closed 4 years ago
Maybe just give a signature and a comment then :)
On Sun, May 10, 2020 at 5:05 PM Bengt Gustafsson notifications@github.com wrote:
@BengtGustafsson commented on this pull request.
In d1985r0.md https://github.com/atomgalaxy/isocpp-universal-template-param/pull/3#discussion_r422664854 :
+
+ +This example is a metafunction to find a matching element in a tuple +based only on its type. The first overload is usable for a unary predicate like +std::is_reference while the second overload is useful for a binary +predicate like std::is_base_of by using a currying helper. + +Currently this can't be implemented as a variable template which +breaks the symmetry with simpler tuple oriented metafunctions such as +tuple_size_v and tuple_element_t. + +Given an overloaded constexpr function tuple_size we could instead +simplify this to: + +
cpp +template size_t tuple_find_v = tuple_find(); Do I really? If so maybe I should select something easier, OTOH its not that many lines, but it would distract from the core subject. But Ok, let me put it in for now.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atomgalaxy/isocpp-universal-template-param/pull/3#discussion_r422664854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5R5NTGINVHU3RCV23YPLRQ3GFLANCNFSM4M5JFCFQ .
Tried to correct two other examples to the best of my understanding.