
David Abrahams schrieb:
Daniel Krügler <dsp@bdal.de> writes:
So you mean, if I use integral_c<T,n>::value, the definition of value is provided by boost?
Yes.
That is really nice and as I said in my first posting, you can blame me now for incomplete testing. It seems to me, that VC7.1 is an open question, but that is part of the other posting of you.
According to my assumptions (which might be wrong, as I said) here applies the same problem, because integral_c<T,n> also contains a BOOST_STATIC_CONSTANT and thus a possibly addressable object, but I am willing to be corrected, of course.
You stand corrected. If you don't believe me: use the source, Luke.
Thanks for the correction.
To make my request more clear: I am **not** speaking of a programming style which **should** take advantage of using integral_c<T,n> instead of an addressable (constant) object, I am speaking of daily programming practice. Since e.g. integral_c<T,n>::value is not a boost-internal "you-should-not-use-or-you-are-fired",
I don't know what any of that means, sorry.
All initial answers implied to me, that the corresponding definitions where not provided by boost, so I just was fighting for them ;-) Just forget that b..dozer.
something like
const long myvalue = foo(); // run-time determined value const long max_value = std::max(myvalue, boost::mpl::integral_c<long,15>::value); // Combine compile-time and // run-time information here
without knowing too much about the internals of boost::mpl (besides the fact, that it might be necessary to additionally add some further mpl source files into my project).
It works. Try it or use the source.
I will do that, thanks Dave. Greetings, Daniel