How to match manipulator as template parameter and enable function call for specific ones
<p>I have a requirement where I have variadic template parameters passed to a function. Of course there are going to be different implementations of the function depending on the template parameter. I need to identify manipulators as template parameters.</p>

<pre><code>//If T is manipulator call this method
template &lt;typename T, typename... Args&gt;
void foo(const T&amp; t, const Args&amp;... args){
    /*Do something if T is manipulator*/
} 

//Otherwise this one
template &lt;typename T, typename... Args&gt;
void foo(const T&amp; t, const Args&amp;... args){
    /*Do something if T is not a manipulator type*/
}
</code></pre>

<p>I have tried using <code>std::enable_if&lt;std::is_same&lt;decltype(/*some specific manipulator*/), T&gt;::value&gt;</code>. But a problem with this approach is that some manipulators don't fit to this. Could someone suggests me a better solution than the mentioned. Also not all the manipulators has the same signature, and their return types are defined at compile time.</p>

<p><a href="http://en.cppreference.com/w/cpp/io/manip" rel="nofollow" title="Manipulators">Manipulators</a></p>