From: Eric Friedman (ebf_at_[hidden])
Date: 2004-11-07 18:04:03
I am one of the Variant authors. Could you clarify what you mean by
standard templates "shall not be used with incomplete types"---does this
mean for instance that std::vector<incomplete_t> is undefined? If so, is
it undefined even if such a type is even only mentioned in a program
without actually ever instantiating the template?
Maxim Yegorushkin wrote:
>>From: Caleb Epstein [mailto:caleb.epstein_at_[hidden]]
>>Subject: Re: const_string + recursive_variant = boom
>>On Thu, 4 Nov 2004 22:18:29 +0300, Maxim Yegorushkin
> <e-maxim_at_[hidden]> wrote:
>>>I striped the sample down to:
>>> typedef make_recursive_variant<int, std::pair<int,
>>>recursive_variant_> >::type value;
>>> value v;
>>>Which compiles fine with MS VC 7.1 and fails to compile on Intel C++
>>Well this code compiles fine on g++ 3.3.2 and g++ 3.4.2.
>>I tried g++ 3.4.2 on my original example and it gives basically the
>>same results as 3.3.2 (taking sizeof an incomplete type) but the
>>compiler dies with an ICE.
>>The newer g++ does however suggests that AllocatorT::rebind should be
>>AllocatorT::template rebind in const_string/detail/storage.hpp, lines
>>79 and 86.
> Well, variant's docs say little about recursive variants and standard
> templates (which shall not be used with incomplete types) and I am not
> an expert in variant architecture, so it would be nice if someone
> knowledgeable could clarify the issue.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk