ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] MPL usage for code generation
by Hugo Duncan other posts by this author
Jan 22 2003 11:05PM messages near this date
RE: [boost] RE: math constant - generic function circle_area example. | [PMX:#] [boost] Re: MPL usage for code generation
I am trying to use MPL to generate code.  

I have a list of types, which I would like to use to call a template
function with arguments that are not dependent on the list.

eg

given:
  template <typename T>  void my_function(std::string& s);
  typedef list<int, float, double>  my_list;
  std::string s;

what do I write using MPL to generate the equivalent of the following ?

  my_function<int> (s);
  my_function<float> (s);
  my_function<double> (s);


I have looked for code to copy in test/examples/mpl paper and 
have not found anything similar to what I need (which doesn't 
mean it isn't there somewhere). Any pointers?  Is this possible?

Thanks
Hugo



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Hugo Duncan
Andrei Alexandrescu
Hugo Duncan
Hugo Duncan
Hugo Duncan
David Abrahams
Peter Dimov
David Abrahams
=?iso-8859-1?Q?Terje_Sletteb=F8?=
=?iso-8859-1?Q?Terje_Sletteb=F8?=
=?iso-8859-1?Q?Terje_Sletteb=F8?=
David Abrahams
Hugo Duncan
Andrei Alexandrescu
David Abrahams
David Abrahams
Andrei Alexandrescu
David Abrahams
Douglas Paul Gregor
David Abrahams
Douglas Paul Gregor
David Abrahams
Douglas Paul Gregor
David Abrahams
Douglas Paul Gregor

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved