Move functor to its own namespace to block bringing boost::core to ADL.

This commit is contained in:
Andrey Semashev
2024-02-02 05:23:00 +03:00
parent 95f0b35c36
commit 0a35bb6a20
3 changed files with 42 additions and 0 deletions
+7
View File
@@ -18,6 +18,9 @@
namespace boost::core {
// Block unintended ADL
namespace functor_ns {
//! A function object that invokes a function specified as its template parameter
template< auto Function >
struct functor
@@ -29,6 +32,10 @@ struct functor
}
};
} // namespace functor_ns
using functor_ns::functor;
} // namespace boost::core
#endif // BOOST_CORE_FUNCTOR_HPP