Walter
Walter

Reputation: 45444

syntax for declaring templated function pointer in C++ with keyword using

consider

template<typename T>
struct auxiliary
{
  typedef std::unique_ptr<T> (*creator)(std::vector<double>const&);
};
template<typename T>
using creator = typename auxiliary<T>::creator;

I wonder how to declare creator without auxiliary, i.e.

template<typename T>
using creator = ???    

Upvotes: 0

Views: 287

Answers (1)

Simple
Simple

Reputation: 14390

template<typename T>
using creator = std::unique_ptr<T> (*)(std::vector<double> const&);

Upvotes: 2

Related Questions