
David Abrahams wrote:
Ultimately I think the right answer is to use
mpl::integral_c<some_type, some_value>
or
mpl::bool_<some_value>
etc.
everywhere as Paul Mensonides suggested. One reason is that it centralizes the out-of-line static member definitions.
I tried this (in the algorithm/string library where I also tested the enum trick for Pavol Droba) and just replaced in algorithm/string/std/string_traits.hpp following lines enum { value = false } ; typedef mpl::bool_< value > type ; with typedef mpl::bool_< false > value ; typedef mpl::bool_< value > type ; and this evidently results in a compilation error. I am not very fluent in mpl but AFAICT this seems like a nice solution but not exactly a drop-in replacement for the current situation.