CppCon 2019 has ended
Back To Schedule
Wednesday, September 18 • 14:00 - 15:00
ADL: a thorough introduction in name taxonomy, customisation points and use cases in the context of templates

Log in to save this to your schedule, view media, leave feedback and see who's attending!

This talk introduces argument dependent lookup(ADL); name taxonomy; and customisation points in order to demonstrate and understand the peculiarities and the process of looking up names with ADL. Furthermore, this talk will demonstrate and discuss ADL thoroughly in the context of templates.

What is ADL?

ADL is a C++ feature that extends a name’s* lookup set by associating it with “extra” namespaces. The C++ standard mandates name taxonomy in a nonintuitive way that makes it difficult for young programmers to understand and use this feature. On the other hand, in advanced use cases of templates even experienced programmers sometimes struggle to reason about their code.

Why ADL?

It greatly enhances the usability of templates by allowing the compiler to extend the overload resolution of a template call allowing it look up more declarations which otherwise would be hidden from the compiler.

Library authors who design generic code don’t know firsthand how the users intent to use the library. Therefore, it’s essential to allow clients to customise the behaviour of their generic code on cases where they believe a more specialised implementation is desired. For instance, a qualified call to std::swap() is condemned to bypass any user defined overload of swap().

*The precise definition will be given in the name taxonomy category section of the outline

avatar for Kostas Kyrimis

Kostas Kyrimis

Software Engineer, Codeplay Software
Kostas Kyrimis is a software engineer who is working on ComputeCpp; Codeplay’s implementation of the Khronos Group open standard SYCL for heterogenous computing. He advocates modern C++ practices, appreciates generic programming and algorithms and he is a supporter of expressive... Read More →

Wednesday September 18, 2019 14:00 - 15:00
Crest 3

Attendees (103)