Opened 10 years ago

Last modified 4 years ago

#2674 new Feature Requests

request to make BOOST_PARAMETER_MAX_ARITY re-defineable

Reported by: Frank Mori Hess Owned by: Daniel Wallin
Milestone: Boost 1.38.0 Component: parameter
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

I'd like to be able to increase BOOST_PARAMETER_MAX_ARITY in my library header if needed, and then include the Boost.Parameter library without worrying that the user might have already included Boost.Parameter headers and thus made my attempt to increase the max arity futile. I believe the Boost.Function library has this feature. My use case is trying to apply Boost.Parameter to the boost::signals2::signal class, which currently has 7 template type parameters (but BOOST_PARAMETER_MAX_ARITY defaults to 5).

Change History (2)

comment:1 Changed 8 years ago by expaler

One workaround I use in my libraries is to compare BOOST_PARAMETER_MAX_ARITY to the minimum number of parameters via BOOST_PP_LESS, then spit out an #error message if the condition is true. This technique passes the onus of setting BOOST_PARAMETER_MAX_ARITY to the appropriate value from the developer to the users.

comment:2 Changed 4 years ago by anonymous

search:?q=crash will search for the string "crash"

Note: See TracTickets for help on using tickets.