diff --git a/include/boost/pending/ct_if.hpp b/include/boost/pending/ct_if.hpp index 1655cfa..5fbb045 100644 --- a/include/boost/pending/ct_if.hpp +++ b/include/boost/pending/ct_if.hpp @@ -36,12 +36,23 @@ namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template +// agurt, 15/sep/02: in certain cases Borland has problems with +// choosing the right 'ct_if' specialization even though 'cond' +// _does_ equal '1'; the easiest way to fix it is to make first +// 'ct_if' non-type template parameter boolean. +#if !defined(__BORLANDC__) + template struct ct_if { typedef ct_if_error type; }; template - struct ct_if<1, A, B> { typedef A type; }; + struct ct_if { typedef A type; }; template - struct ct_if<0, A, B> { typedef B type; }; + struct ct_if { typedef B type; }; +#else + template + struct ct_if { typedef A type; }; + template + struct ct_if { typedef B type; }; +#endif template struct ct_if_t { typedef ct_if_error type; };