Вопрос

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