Boost logo

Boost :

From: Arash Partow (arash_at_[hidden])
Date: 2006-07-13 10:21:33

Hi all,

I'm having some difficulties getting the following piece of code to compile:

#include <iostream>
#include <vector>

#include <boost/utility.hpp>
#include <boost/bind.hpp>
#include <boost/tuple/tuple.hpp>

class AClass
    void b(int i, int j, int k)
       std:: cout << "a::b() - " << i << "\t" << j << "\t" << k << std::endl;

template <typename T,int i> class select
   typedef typename boost::tuples::element<i,T>::type result_type;

   template <typename U>
   result_type operator()(const U& u) const
     return u.get<i>();


int main(int argc, char* argv[])
   typedef boost::tuples::tuple<AClass,int,int,int> param_set;

    std::vector<param_set> list;


     return true;

Basically the "select class" is a code snippet I found on this list,
the compilation errors I believe exist in how I'm calling bind, but
I cant tell whats going wrong.

Also I'm wondering is there a better way of doing what I'm trying to
do, is there already a class or something in boost that will allow
one to bind a function and a tuples of parameters.

Also I'm wondering if it will be possible to derive AClass from
boost::noncopyable and still be able to instantiate class instances
as part of method parameters.

Any help would be very much appreciated.

Arash Partow
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.

Boost list run by bdawes at, gregod at, cpdaniel at, john at