컨테이너를 채우기 위해 여러 문자열을 전달하려고하는데이 오류가 발생합니다. gcc 사용 4.9.3Variadic 템플릿 : 오류 : '...'으로 확장되지 않은 매개 변수 팩
template< class T >
struct DataCompare {
bool operator()(const T& lhs, const T& rhs) const
{
return operator<(lhs->getCode(), rhs->getCode());
}
};
using AggContainer = boost::container::flat_set< T, C >;
using DataPtr = boost::shared_ptr<BomQueueData>;
using PropertyQueueDataLess = DataCompare<DataPtr>;
using QueueDataPtrs = AggContainer< DataPtr, DataLess >;
QueueDataPtrs vector_name;
template< class Container, typename ... Args >
static void fillWithData(Container & oDataContainer, Args const & ... args)
{
typedef typename Container::value_type::element_type QueueDataPtr;
oDataContainer.emplace(new QueueDataPtr(args));
}
fillWithData(vector_name, x, a, b, c, d); // compiler error
어떻게 해결할 수 있습니까?
A [최소, ** 전체 **하고 검증 예] (HTTP를 만들려고하세요 /stackoverflow.com/help/mcve) 우리를 보여주십시오. 또한 전체 오류 출력 (템플릿이있는 한 오랫동안)을 텍스트로 복사하여 붙여 넣으십시오. –