|
Boost Users : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-02-29 10:31:54
AMDG
Hicham Mouline wrote:
> hi,
>
> I would like to avoid template instantiations with ContractType whose static functions st1 and st2 return an enum...
>
> template <typename ContractType>
> class C {
> BOOST_STATIC_ASSERT( !(ContractType::st1()==A && ContractType::st2()==P) );
> ...
> };
>
> Is there a way to make this work?
You can't use static functions. st1 and st2 have to be either
enumerators or static const /integral types/
template <typename ContractType>
class C {
BOOST_STATIC_ASSERT( !(ContractType::st1==A && ContractType::st2==P) );
...
};
In Christ,
Steven Watanabe
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