
10 Oct
2010
10 Oct
'10
5:59 p.m.
I'm trying to bind a boost array to be called at a later time. This is giving me a lot of errors. Is what I'm attempting possible? Ryan template<typename T, std::size_t U> class Sorter { private: typedef boost::function<void(boost::array<T, U> & a)> t_SortFunction; t_SortFunction m_SortFunction; public: Sorter(t_SortFunction func) : m_SortFunction(func) {} bool sort(boost::array<T, U> & a) { m_SortFunction(a); } }; template<typename T, std::size_t U> void quicksort(boost::array<T, U> & a) { } int main(int argc, char* argv[]) { Sorter shell(boost::bind(quicksort, _1)); return 0; }