|
Boost Users : |
From: Michael Held (michael.held_at_[hidden])
Date: 2006-11-30 13:03:02
hi,
I am using BOOST_STATIC_CONST for static class members of a base class.
I have following situation:
template <int T>
class A
{
typedef typename MyType<T>::value_type value_type;
BOOST_STATIC_CONST(typename value_type::some_type, MY_CONSTANT = 0);
};
template <int T>
class B : public A<T>
{
typedef A<T> Base;
typedef typename Base::value_type value_type;
BOOST_STATIC_CONST(typename value_type::some_type, MY_CONSTANT =
Base::MY_CONSTANT);
};
or
template <int T>
class B : public A<T>
{
typedef A<T> Base;
typedef typename Base::value_type value_type;
using Base::MY_CONSTANT;
};
for both cases I got a linker error:
/usr/bin/ld: Undefined symbols:
B<0>::MY_CONSTANT
what am I doing wrong?
I am using darwin gcc4.0.1 and Boost from CVS
thanks a lot!
michael
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net