"'tag_invoke' - An Actually Good Way to Do Customization Points" - Gašper Ažman

Sdílet
Vložit
  • čas přidán 27. 06. 2020
  • tag_invoke is the new (and awesome) way to do customization points in C++ that does not take up global names, is extensible, fast, and precise. This talk will teach you how to employ this soon-to-be-standard mechanism in your own code.
    ---
    This talk was given at C++ London, June 2020
    www.meetup.com/CppLondon/even...
  • Věda a technologie

Komentáře • 4

  • @spazzatour
    @spazzatour Před 3 lety +4

    For those who want to jump over the premises, the actual talk about tag_invoke starts at 52:45

  • @think2086
    @think2086 Před 3 lety +1

    Thanks for this hard to find information. This video is a "milestone" test in understanding, I believe. I.e., the ideas referenced in the video are in themselves quite difficult and educational. You will (unless you're in the standards club or whatever) need to pause and take multiple days to study the various aspects. My rule is that I'm not allowed to not know a piece of vocabulary in English, so I always stop to look up words and phrases until I know them. You can do the same for C++. Eventually, if you can get through the entire video in one setting without pausing or rewinding, in real time, and fully understand all of it, it will serve as a sort of mega test in modern C++ understanding. It's one of *those* kinds of courses. It sort of demands you go back and learn all this other older (and also cutting edge) stuff you didn't know you didn't know.
    One small suggestion, consider renaming Problem #5 "Extension problem" instead of "Adaptation problem." This whole thing is adaptation, and it's a bit confusing with #3. Realizing you're talking about EXTENDING something helps.

  • @iikjjpp
    @iikjjpp Před 3 lety +2

    The technique is super neat. 54:43 "let's have **one** Niebloid". Why not zero? stackoverflow.com/questions/63818871/why-does-tag-invoke-pattern-need-the-niebloid-stdtag-invoke-at-all

  • @kylcho5239
    @kylcho5239 Před 2 lety

    I think so called Niebloids and CPOs are different entities to solve different types of problems.
    Niebloids (called entities in the std::ranges in the standard?) is to inhibit ADL when using in unqualified and CPOs internally rely on ADL.
    Right now the only way to implement Niebloids without a new language feature is to use function objects.
    Due to using function objects and dealing with ADL, these two are seemingly same/equivalent but not.
    So in the future, people can come up with new ideas(e.g., new language feature) to implement Niebloids not using function objects.