parameter/test/literate/parameter-enabled-function-call-operators0.cpp
CromwellEnage a2f68bea6c Update test suite
* Add "test/literate/parameter-enabled-function-call-operators0.cpp" to test suite under alias 'parameter_literate_tests'.
* Add compose() test routine to "test/compose.cpp"
* Replace LIBS_PARAMETER_TEST_COMPILE_FAILURE_MSVC with LIBS_PARAMETER_TEST_COMPILE_FAILURE_VENDOR_SPECIFIC in case compilers other than MSVC start exhibiting errant behavior.
* Adjust for the fact that BOOST_PARAMETER_MAX_ARITY is defined regardless of whether or not BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.
* Use minimal file headers to #include vice <boost/parameter.hpp>.
2019-01-16 03:21:13 -05:00

30 lines
516 B
C++

#include <boost/parameter.hpp>
#include <iostream>
using namespace boost::parameter;
BOOST_PARAMETER_NAME(arg1)
BOOST_PARAMETER_NAME(arg2)
struct callable2
{
BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR(
(void), tag, (required (arg1,(int))(arg2,(int)))
)
{
std::cout << arg1 << ", " << arg2 << std::endl;
}
};
#include <boost/core/lightweight_test.hpp>
int main()
{
callable2 c2;
callable2 const& c2_const = c2;
c2_const(1, 2);
return boost::report_errors();
}