boost::variant's and > 10 supported types
Hi, How do I support > 10 types in a variant without having support for make_variant_over (since I wish to still support Borland and MSVC 6/.NET (aka. 7, not 7.1), as well as gcc). To be precise, I need 18 types to be supported. -- PreZ Founder The Neuromancy Society http://www.neuromancy.net
hi list
i am developping a scheduling algorithm usig boost graph library.
I want to update the list of the ready tasks. for that , i develop a
function
template
Hi Adel, On Mar 27, 2004, at 9:13 PM, Adel Essafi wrote:
NameType src_name; boost::graph_traits<Graph>::vertex_iterator vi;
for (vi=in_edges(v,g).first; // XXXXXXXX vi!=in_edges(v,g); ++vi){
The return type of in_edges() is a pair of in_edge_iterator's, not vertex_iterator's. So you should do something like this instead: boost::graph_traits<Graph>::in_edge_iterator ei; for (ei=in_edges(v,g).first; ei != in_edges(v.g).second; ++ei){ Hope that helps, Jeremy P.S. Also I recommend using boost::tie in the for loop, as is done in most of the graph examples.
"Preston A. Elder"
Hi,
How do I support > 10 types in a variant without having support for make_variant_over (since I wish to still support Borland and MSVC 6/.NET (aka. 7, not 7.1), as well as gcc).
To be precise, I need 18 types to be supported.
You might look at http://www.boost.org/doc/html/variant.tutorial.html#variant.tutorial.over-se... -- Dave Abrahams Boost Consulting www.boost-consulting.com
Hi Preson, Sorry for the slow reply. (I don't monitor the Boost Users list, and I probably should. Thanks to Dave Abrahams for alerting me to your post.) Preston A. Elder wrote:
How do I support > 10 types in a variant without having support for make_variant_over (since I wish to still support Borland and MSVC 6/.NET (aka. 7, not 7.1), as well as gcc).
To solve your problem under the current implementation, you need a greater value for BOOST_MPL_LIMIT_LIST_SIZE. I'm unfortunately not attuned enough to the MPL implementation to know what is involved in attaining this; I've CCed this to Aleksey Gurtovoy (the MPL maintainer), who may be able to help you. Also, I have some ideas for possibly making make_variant_over work under Borland in a future release. Of course, this doesn't address MSVC6, but I'm guessing that it is a lost cause anyhow. Sorry I couldn't help more. Eric
participants (5)
-
Adel Essafi
-
David Abrahams
-
Eric Friedman
-
Jeremy Siek
-
Preston A. Elder