Picking off more borland errors, I have a couple of questions on this
test case:

1/ should char be Char in the following snippet [case-error]
[Extract of static_assert.hpp starting line 53]

template <class Int, class Char>
struct Bill
{
  private:  // can be in private, to avoid namespace pollution
    BOOST_STATIC_ASSERT(sizeof(Int) > sizeof(char)); // <-- error?
  public:
...

2/ This same line line is the source of the borland error.  A quick test
shows it cannot cope with the simple

    BOOST_STATIC_ASSERT( 5 > 3 );

however

    BOOST_STATIC_ASSERT( 5 >= 3 );

passes fine.  I guess the > is fooling the template parser.

This leads to the obvious workaround of:

#if defined( __BORLANDC__ )  //  Borland cannot handle > comparison
    BOOST_STATIC_ASSERT( 
           ( sizeof(Int) >= sizeof(Char) ) 
        && ( sizeof(Int) != sizeof(Char) ) 
        );
#else
    BOOST_STATIC_ASSERT(sizeof(Int) > sizeof(Char));
#endif

However, I am not happy patching test-cases rather than libraries.  On
the other hand, having diagnosed the problem with a viable workaround, I
don't see where else to record the information.  Do we have a way of
documenting known workarounds for a library?

--
AlisdairM

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to