| 1 | /* |
| 2 | * Copyright Andrey Semashev 2024. |
| 3 | * Distributed under the Boost Software License, Version 1.0. |
| 4 | * (See accompanying file LICENSE_1_0.txt or copy at |
| 5 | * http://www.boost.org/LICENSE_1_0.txt) |
| 6 | */ |
| 7 | /*! |
| 8 | * \file functor_compile_fail_adl.cpp |
| 9 | * \author Andrey Semashev |
| 10 | * \date 02.02.2024 |
| 11 | * |
| 12 | * This file tests that \c boost::core::functor doesn't bring namespace |
| 13 | * \c boost::core into ADL. |
| 14 | */ |
| 15 | |
| 16 | #include <boost/core/functor.hpp> |
| 17 | |
| 18 | void func() {} |
| 19 | |
| 20 | namespace boost::core { |
| 21 | |
| 22 | void check_adl(functor< ::func > const&) |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | } // namespace boost::core |
| 27 | |
| 28 | int main() |
| 29 | { |
| 30 | // Must not find boost::check_adl |
| 31 | check_adl(boost::core::functor< ::func >()); |
| 32 | } |
| 33 | |