
7. stream_buf_wrapping.hpp: there are three hardcoded constructors like:
template < typename T1, typename T2, typename T3 > basic_wrapping_ios( T1 x1, T2 x2, T3 x3 )
for 1, 2 and 3 parameters though base_from_member supports up to 10 parameters.
I wrote base_from_member, and I extended BFM after initially writing More-I/O.
Boost.Preprocessor can be used here to generate contructors of all available arities.
Any suggestions on how? And should I leave the arity number available in BFM (as a #define) so others can mirror it?
I've attached a version of base_from_member.hpp with configurable maximum arity, defaulting to 10. If you need higher arity, you #define BOOST_BASE_FROM_MEMBER_MAX_ARITY to an appropriate value before including
"Jonathan Turkanis" wrote: ______________________________________________________________ the
header.
The same technique will work for streambuf wrapping.
It may be better to use local iteration technique. Some preprocessors (e.g. BCB) have quite low limit on length of expanded macro (BCB has some 1-2kB). Local iteration is also faster on EDG based frontends. For base-from-member it is probably safe but streamsbufs may be harder. /Pavel