문제

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