|
Boost : |
Subject: [boost] [type_erasure]bug in computed_bases?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-08-27 20:39:33
Based on the output of the test code(compute_bases.cpp) in the 1st
attachment, the compute_bases metafunction defined in any.hpp is
producing something like:
concept_interface
< concepts
, concept_interface
< mpl::at_c<concepts,1>::type
, concept_interface
< mpl::at_c<concepts,2>::type
, ID
, Enable
>
, ID
, Enable
>
, ID
, Enable
>
where concepts is the Concept argument to any.
When the test code is run with:
//#define OVERLOAD_SIMPLE
the output is what should be expected with
a_any.simple();
calling the simple<.>::apply static method.
The output for this case is shown in the
compute_bases.not_overload_simple.out.
OTOH, when the test code is run with:
#define OVERLOAD_SIMPLE
the code in the concept_interface<typename
requirements<C>::type,...>::simple is run.
The output for this case is shown in the
compute_bases.yes_overload_simple.out.
This output shows that the concept_interface<C,...>
CTOR is called where C == mpl::vector<...>.
Is this the intended behaviour? If so, where is this spelled out in
the documentation? The documentation here:
certainly doesn't suggest anything of that sort, and the doc here:
says:
1. typename Concept
The concept that we're specializing concept_interface for.
which uses the singular Concept instead of the plural Concepts,
suggesting the Concept is not an mpl::vector<> of any sort.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk