Violet Giraffe
Violet Giraffe

Reputation: 33579

Template method with one of the types being itself a template class

class Foo {
public:
   template<typename SignalType, typename ...Arguments>
    void invokeQueued(SignalType<Arguments...>& signal, const detail::identity<Arguments>&... args)
    {
        m_threadSyncQueue.invokeQueued(signal, tag, std::forward<Arguments>(args)...);
    }
}

This code generates enormous number of errors in all the .cpp files it's included into, starting with

unrecognizable template declaration/definition

in the first invoke parameter. How to make it work?

Upvotes: 0

Views: 36

Answers (1)

ForEveR
ForEveR

Reputation: 55887

You should use template template parameter.

template<template<typename...> class SignalType, typename... Arguments>

Upvotes: 3

Related Questions