Most my porting to borland recently has involved a couple of new bugs introduced in BCB6. Rather than testing compiler and version everywhere, should I instead create some BOOST_SOME_DEFECT macros in the borland config file and test for those instead? If so, any suggestions for the macro names would be appreciated.
The two defects are: The various std::isdigit, islower, isalnum etc. convenience functions will not compile. The fix in this case is to simply implement the function directly via use_facet instead e.g: std::use_facet<std::ctype<Ch> >( oss_.rdbuf()->getloc() ).is( std::ctype_base::digit, c ) [Also note in the general case it may be necessary to remove_const on the character type] Second problem is with the STLport implementation of the STL. This places all std names into the namespace _STL and uses macro-magic to make this look like std. Unfortunately, for reason I have not fully determined, that magic sometimes comes up short. Often the fix is to add a using directive: using std::swap; swap( a, b ); Sometimes the fix is to explicitly specify namespace _STL instead. _STL::swap( a, b ); There are cases where either fix works, and specific cases where only one form or the other works. As best I can figure, these macros should be defined #if defined(__BORLAND__) \ && __BORLANDC__ >= 0x0560 \ && __BORLANDC__ <= 0x0561 In the latter case we should test that the STLport library has been chosen as well. Are either of these cases already covered by another existing workaround? Do either of these problems look familiar to users of other compilers? [Note: I have not tested with the Kylix compiler but suspect it will have similar issues] -- AlisdairM _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost