
--- David Abrahams <dave@boost-consulting.com> wrote:
Did you compile it? If so, on what compilers?
My main development compiler is MinGW 3.2; I haven't actually tested it on MSVC 6.
I can't see how it could possibly work.
I just read that not all compilers support inline initialisation of member constants. Arrgh!
#include <boost/config.hpp>
template <typename RealNum> struct sample_t { BOOST_STATIC_CONSTANT(RealNum, base = 5.0); BOOST_STATIC_CONSTANT(RealNum, power = 1.0); BOOST_STATIC_CONSTANT(RealNum, angle = 1.234); };
is an illegal program (try comeau online to see some reasons why).
I was hoping BOOST_STATIC_CONSTANT would work on more than just integral types.
Also, it's not very mpl-ish. Nothing seems to follow the metafunction protocol of operating on and returning types.
Oh, okay. I'll keep this protocol in mind the next time I try to write MPL metafunctions. Right now, it seems I can't directly use templates anyway for this library.
I hate to be discouraging; it's probably a really interesting idea.
No problem. I have a need for this sort of thing myself, so I'll definitely keep working at it.
I am only looking as far as some details of the implementation, here.
I'll look into Boost.Preprocessor to see if I can implement my functions via macros. I'll send another email when I have results. Cromwell Enage __________________________________ Do you Yahoo!? SBC Yahoo! - Internet access at a great low price. http://promo.yahoo.com/sbc/