
Don't use dependent default parameters for non-type template parameters. For example:
template <class T, int I = ::boost::is_integral<T>::value> // Error can't deduce value of I in some cases. struct foobar;
Rationale: this kind of usage fails for Borland C++. Note that this is only an issue where the default value is dependent upon a previous template parameter, for example the following is fine:
Is there any known workaround for this? In my case, int is replaced by bool but I think it is the same issue.
I'm not sure if that's still an issue for current compilers, but the workaround would be: template <class T, bool b> struct bar{ /*actual implementation here*/ }; template <class T> struct foo : public bar<T, ::boost::is_integral<T>::value> {} HTH, John.