C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

question about dynamic_any

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Florian Preknya
Guest





PostPosted: Mon Mar 28, 2005 12:03 pm    Post subject: question about dynamic_any Reply with quote



I read about dynamic_any a year ago, once with the the dynamic_any
campaign proposed by CUJ (see
[url]http://www.cuj.com/documents/s=8470/cujweb0309nasonov)[/url]. I did not see
the power of the construction that time, but nowadays I realized I need
something like dynamic_any for my current project. I don't know if it's
feasible, but my ideea was to use dynamic_any instead of template
parameters for methods that I want to keep virtual, but also permit
"generic" parameters.
So, what's the status of dynamic_any in the boost corner? It's in
proposal form, or it was removed (because it is covered by other
libraries), etc. ? I saw that the dynamic_any project is on hold, I
think was never compiled on Windows systems. Also, it generates an
INTERNAL_COMPILER_ERROR on VC7.1. (I can give further details if
needed). Also, the dynamic_any version I take from sourceforge rely on
an older version of boost and I had to modify some include paths.

Or, is another trick for my problem that can be done without
dynamic_any? (see a simplified sample)

// what I want, but not possible
// Note that I don't want to make the Factory class a template class!!
class AKindOfFactory
{
template <class Iterator>
virtual boost::shared_ptr<NewObject> create(Iterator start,
Iterator end) = 0;
};

// can be redesigned with dynamic_any like this

typedef dynamic_any::any<mpl::list dynamic_any::increment> > any_iterator;

class AKindOfFactory
{
virtual boost::shared_ptr<NewObject> create(any_iterator start,
any_iterator end) = 0;
};


Thanks,
Florian Preknya

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Alexander Nasonov
Guest





PostPosted: Mon Mar 28, 2005 5:28 pm    Post subject: Re: question about dynamic_any Reply with quote



Hello Florian,
This library is still under (not active, though) development. I'm not
quite satisfied with operation's interface especially with
multiple-dispatch. Good news is that I'm slowly moving in this
direction. In order to get multiple-dispatch working as I like, I
invented "overloads" library. It's now in MPL todo list:
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?MPL_TODO_List

I've already applied the overloads library to finite state machines and
I'm going to apply it to dynamic_any soon. I can't tell you when it
will be done because it's a lot of work and I never have enough time.

Regarding your problem, it's worth looking at another library under
construction, namely, any_iterator:
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LibrariesUnderConstruction
--
Alexander Nasonov


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.