Piecing together some examples I found on stackoverflow, I'd like to do the following:
template<typename T>
using FuncPtr = boost::function< int (const T) >;
Perhaps to later use it like so:
template<typename T>
build_fancy_lookup_table( string key, FuncPtr<T> fp);
However, it doesn't appear to work. I get the following error message:
error: expected unqualified-id before ‘using’
I'm wondering what I'm doing wrong here? I'd like to be able to typedef/alias the boost::function expression to aid in coding.
Here's how I am compiling:
prompt> g++ foo.cpp
prompt> g++ --version
g++ (Debian 4.7.2-5) 4.7.2
thanks.