Opened 14 years ago
Last modified 8 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).
Note:
See TracTickets
for help on using tickets.
One workaround I use in my libraries is to compare
BOOST_PARAMETER_MAX_ARITY
to the minimum number of parameters viaBOOST_PP_LESS
, then spit out an#error
message if the condition is true. This technique passes the onus of settingBOOST_PARAMETER_MAX_ARITY
to the appropriate value from the developer to the users.