Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-11-04 03:41:31

In MSVC 6.0, the following snippet fails:

#include <boost/archive/text_iarchive.hpp>
#include <boost/tuple/tuple.hpp>

int main()
  return 0;

complaining about is_abstract being already defined. The problem
lies in the following lines inside boost/serialization/is_abstract.hpp:

#if defined(__GNUC__) && (34 <= _GNUC__ * 10 + __GNU_MINOR) \
    || defined(__MSVC_VER) && (1310 <= __MSVC_VER) \
    || defined(__EDG_VERSION__) \
    #include <boost/type_traits/is_abstract.hpp>
// default to false if not supported
    namespace boost {
    template<class T>
    struct is_abstract {
        typedef mpl::bool_<false> type;
        BOOST_STATIC_CONSTANT(bool, value = is_abstract::type::value);
    } // namespace boost

The code is *incorrectly* using __MSVC_VER where it should use
_MSVC_VER (just one leading underscore). Thus boost::is_abstract is
twice, as boost/type_traits.hpp is implicitly included by

If nobody complains, I can fix this and commit it to the release and
main branch.
What worries me, though, is that the code above seems flawed to me
(apart from the minor typo). What happens if the compiler is not one of
taken care of explicitly in boost/serialization/is_abstract.hpp? Could
please test the first snippet in some compiler other than MSVC, ICC for
GCC or an EDG-based compiler? My thesis is that it will fail.

Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at