/usr/include/boost/functional/overloaded_function/detail/base.hpp is in libboost1.55-dev 1.55.0+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | // Copyright (C) 2009-2012 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0
// (see accompanying file LICENSE_1_0.txt or a copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Home at http://www.boost.org/libs/functional/overloaded_function
#if !BOOST_PP_IS_ITERATING
# ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_BASE_HPP_
# define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_BASE_HPP_
# include <boost/functional/overloaded_function/config.hpp>
# include <boost/function.hpp>
# include <boost/preprocessor/iteration/iterate.hpp>
# include <boost/preprocessor/repetition/enum.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/comma_if.hpp>
#define BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
BOOST_PP_CAT(A, n)
#define BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused) \
BOOST_PP_CAT(a, n)
#define BOOST_FUNCTIONAL_DETAIL_arg_tparam(z, n, unused) \
typename BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused)
#define BOOST_FUNCTIONAL_DETAIL_arg(z, n, unused) \
BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused)
#define BOOST_FUNCTIONAL_DETAIL_f \
R (BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity, \
BOOST_FUNCTIONAL_DETAIL_arg_type, ~))
// Do not use namespace ::detail because overloaded_function is already a class.
namespace boost { namespace overloaded_function_detail {
template<typename F>
class base {}; // Empty template cannot be used directly (only its spec).
# define BOOST_PP_ITERATION_PARAMS_1 \
(3, (0, BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX, \
"boost/functional/overloaded_function/detail/base.hpp"))
# include BOOST_PP_ITERATE() // Iterate over funciton arity.
} } // namespace
#undef BOOST_FUNCTIONAL_DETAIL_arg_type
#undef BOOST_FUNCTIONAL_DETAIL_arg_name
#undef BOOST_FUNCTIONAL_DETAIL_arg_tparam
#undef BOOST_FUNCTIONAL_DETAIL_arg
#undef BOOST_FUNCTIONAL_DETAIL_f
# endif // #include guard
#elif BOOST_PP_ITERATION_DEPTH() == 1
# define BOOST_FUNCTIONAL_DETAIL_arity BOOST_PP_FRAME_ITERATION(1)
template<
typename R
BOOST_PP_COMMA_IF(BOOST_FUNCTIONAL_DETAIL_arity)
BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
BOOST_FUNCTIONAL_DETAIL_arg_tparam, ~)
>
class base< BOOST_FUNCTIONAL_DETAIL_f > {
public:
/* implicit */ inline base(
// This requires specified type to be implicitly convertible to
// a boost::function<> functor.
boost::function< BOOST_FUNCTIONAL_DETAIL_f > const& f): f_(f)
{}
inline R operator()(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
BOOST_FUNCTIONAL_DETAIL_arg, ~)) const {
return f_(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
BOOST_FUNCTIONAL_DETAIL_arg_name, ~));
}
private:
boost::function< BOOST_FUNCTIONAL_DETAIL_f > const f_;
};
# undef BOOST_FUNCTIONAL_DETAIL_arity
#endif // iteration
|