> Several of the boost libraries select functionality based on the result
> of some compile-time test.  The result is usually stored in a
> BOOST_STATIC_CONST( bool, test::value );
>
> The current Borland compiler does not allow these values to be used as
> template parameters though.
>
> I suggest a new config macro
>
> BOOST_NO_STATIC_CONST_AS_TEMPLATE_PARAM
> and if this is defined the metafunction result is passed directly into
> the template parameter

We could, but part of the guideline for integral constant expressions, is
don't do that :-)

> eg: [from lambda_traits]
>
> #if defined( BOOST_NO_STATIC_CONST_AS_TEPLATE_PARAM )
>   typedef
>     action<
>       boost::tuples::length<args_t>::value,
>       function_action< boost::tuples::length<args_t>::value >
>     > action_type;
> #else
>   BOOST_STATIC_CONSTANT(int, nof_elems =
> boost::tuples::length<args_t>::value);
>
>   typedef
>     action<
>       nof_elems,
>       function_action<nof_elems>
>     > action_type;
> #endif
>
>
> I am not sure if any other compilers would benefit from such a macro,
> nor if this is misbehaviour is new to v6

Probably it might be just as well to use BOOST_WORKAROUND for this ?

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to