boostorg / core

Boost Core Utilities
132 stars 86 forks source link

Move checked deleters into internal namespace to block unintended ADL #165

Closed Lastique closed 4 months ago

Lastique commented 4 months ago

This prevents adding namespace boost to ADL when the deleters are used in template parameters, e.g. in std::unique_ptr.

Lastique commented 4 months ago

@pdimov Any objections?

pdimov commented 4 months ago

It will break forward declarations of checked_deleter, but those should be rare, if they exist at all. So no.