Boost logo

Boost Users :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-09-29 10:26:50


I'm trying to use Boost.Variant to model a recursive data structure
than can be either a scalar value, vector or map. My code works fine
on GCC and VC7.1 but I just now installed Intel C++ 8.1 and am seeing
this error:

/opt/intel/include/c++/utility(48): error: incomplete type is not allowed
        _Ty2 second; // the second stored value
             ^
          detected during instantiation of class "std::pair<_Ty1,
_Ty2> [with _Ty1=const std::string, _Ty2=boost::recursive_variant_]"
at line 111 of "bencode.hpp"

compilation aborted for bdecode.cpp (code 2)

I'm attaching the code, but the crux of the offense seems to be the
recursive variant as the second part of the std::map template:

/// The field_t is the basic building block; you can use it to
/// represent a scalar value, list or dictionary
typedef boost::make_recursive_variant<
    int_t,
    double,
    std::string,
    std::vector<boost::recursive_variant_>,
    std::map<std::string, boost::recursive_variant_>
>::type field_t;

Is icpc right to reject this?

-- 
Caleb Epstein
caleb.epstein_at_[hidden]



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net