8 #ifndef BOOST_GIL_EXTENSION_DYNAMIC_IMAGE_APPLY_OPERATION_HPP 9 #define BOOST_GIL_EXTENSION_DYNAMIC_IMAGE_APPLY_OPERATION_HPP 11 #include <boost/gil/detail/mp11.hpp> 13 #include <boost/variant/apply_visitor.hpp> 15 #ifdef BOOST_GIL_DOXYGEN_ONLY 16 #undef BOOST_GIL_REDUCE_CODE_BLOAT 21 #ifdef BOOST_GIL_REDUCE_CODE_BLOAT 23 #include <boost/gil/extension/dynamic_image/reduce.hpp> 27 namespace boost {
namespace gil {
31 template <
typename Types,
typename UnaryOp>
34 #if defined(BOOST_NO_CXX14_DECLTYPE_AUTO) || defined(BOOST_NO_CXX11_DECLTYPE_N3276) 35 ->
typename UnaryOp::result_type
38 return apply_visitor(op, arg);
43 template <
typename Types,
typename UnaryOp>
46 #if defined(BOOST_NO_CXX14_DECLTYPE_AUTO) || defined(BOOST_NO_CXX11_DECLTYPE_N3276) 47 ->
typename UnaryOp::result_type
50 return apply_visitor(op, arg);
55 template <
typename Types1,
typename Types2,
typename BinaryOp>
58 variant<Types1>
const& arg1,
59 variant<Types2>
const& arg2,
61 #if defined(BOOST_NO_CXX14_DECLTYPE_AUTO) || defined(BOOST_NO_CXX11_DECLTYPE_N3276) 62 ->
typename BinaryOp::result_type
65 return apply_visitor(op, arg1, arg2);
70 #endif // defined(BOOST_GIL_REDUCE_CODE_BLOAT) Definition: algorithm.hpp:30
BOOST_FORCEINLINE auto apply_operation(variant< Types1 > const &arg1, variant< Types2 > const &arg2, BinaryOp op)
Invokes a generic constant operation (represented as a binary function object) on two variants...
Definition: apply_operation.hpp:57