Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-06-09 03:01:16


I've found that mpl::is_sequence fails to operate correctly on certain types
under MSVC7. I haven't tested extensively, but there certainly seems to be
some problem with class templates from namespace std. (The problem likely
extends to other types in other namespaces, and perhaps other compilers, but
I have not investigated the issue thoroughly enough.)

In particular, this is posing a problem for me in incorporating variant into
the next Boost release. Is this a known problem? Any insight welcome.

Thanks,
Eric

P.S. For example:

---
#include "boost/mpl/is_sequence.hpp"
#include "boost/static_assert.hpp"
#include <string>
#include <vector>
#include <utility>
#include <exception>
template <typename T> struct TUDT { };
using namespace boost::mpl;
int main()
{
    // these succeed
    BOOST_STATIC_ASSERT(!is_sequence< std::exception >::value);
    BOOST_STATIC_ASSERT(!is_sequence< TUDT<int> >::value);
    // these fail
//    BOOST_STATIC_ASSERT(!is_sequence< std::pair<int, bool> >::value);
//    BOOST_STATIC_ASSERT(!is_sequence< std::vector<int> >::value);
//    BOOST_STATIC_ASSERT(!is_sequence< std::string >::value);
    return 0;
}

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk