Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2004-03-22 16:45:00


On 03/22/2004 03:34 PM, Larry Evans wrote:
> The attached file gets following output:
For some reason the attachment didn't attach :(
Here's the code:

#include <boost/mpl/vector.hpp>
#include <iostream>
struct member_target
{
   member_target
   ( boost::mpl::vector<void> const&
   )
   {
       std::cout<<"member_target(vector<void> const&)\n";
   }

   member_target
   ( void
   )
   {
       std::cout<<"member_target(void)\n";
   }

   member_target
   ( member_target const&
   )
   {
       std::cout<<"member_target(member_target const&)\n";
   }
};
int main(void)
{
     typedef boost::mpl::vector<void> void_typelist;
     void_typelist a_vtl;
     std::cout<<"mt_var:\n";
     member_target mtvar( a_vtl );
     std::cout<<"mt_con:\n";
     member_target mtcon( void_typelist() );
     std::cout<<"mt_cast:\n";
     member_target mt_cast( static_cast<void_typelist
const&>(void_typelist()) );
     std::cout<<"end:\n";
     return 0;
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk