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 = ???    
有帮助吗?

解决方案

template<typename T>
using creator = std::unique_ptr<T> (*)(std::vector<double> const&);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top