Dear Boosters,

All of our codes are now built on top of boost. Since we might use Cray vector computers more in the future (finally they provides a standard-conforming C++ standard library in release 3.6) we started porting our codes to the Cray. I did not run the full test suite, but just tried to compile my codes for now, which depend on some of the Boost libraries. I encountered two problems that I want to discuss here:

1.) it seems that Cray C++ with the "-h conform" option, which enforces strict standard conformance does not compile this code in boost/filesystem/operations.hpp

class directory_iterator
: public boost::iterator< std::input_iterator_tag,
path, std::ptrdiff_t, const path *, const path & >
{
public:
reference operator*() const { return m_deref(); }
...
};

but complains that reference is not defined. My questions is whether this is a bug in the Cray C++ compiler, or whether the above code (and inheritance of the reference type from the base class) is actually not standard conforming. Can the standard experts help me with that?

Anyways, this code can be made to compile by changing compiler options to be less standard-conforming.

2.) The main problem, and one which breaks most boost libraries is that there is no <cstdint> header, nor stdint.h. Neither is required by the standard, so this is no bug on the Cray side. However, the boost workaround in boost/cstdint.hpp also fails:

# if USHRT_MAX == 0xffff
typedef short int16_t;
...
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif

because on the Cray vector systems a short is 32 bit, and there is no intrinsic 16-bit integer type. What shall we do?

My suggestions is that we might need a BOOST_NO_INT16_T macro in addition to the BOOST_NO_INT64_T macro we have now, and to just define that macro in the code, instead of aborting with an error:

# if USHRT_MAX == 0xffff
typedef short int16_t;
...
# else
#define BOOST_NO_INT16_T
# endif

What do you think?

Best regards,

Matthias

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

Reply via email to