title: decltype and static template method
body: <p>In an attempt to use SFINAE, the following code fails to compile:</p>
  
  <pre><code>template&lt;typename ObjectType, typename GroupA, typename GroupB, typename = void&gt;
  struct DelegateImpl; // default version
  
  template&lt;typename ObjectType, typename GroupA, typename GroupB&gt;
  struct DelegateImpl&lt;ObjectType, GroupA, GroupB, decltype(GroupA::get&lt;ObjectType&gt;())&gt;; // specialization
  </code></pre>
  
  <p>With GCC:</p>
  
  <blockquote>
    <p>error: template argument 4 is invalid</p>
  </blockquote>
  
  <p>With MSVC, a surprisingly more helpful:</p>
  
  <blockquote>
    <p>error C3553: decltype expects an expression not a type</p>
  </blockquote>
  
  <p>My aim is to have the compiler pick the specialization if the expression <code>GroupA::get&lt;ObjectType&gt;()</code> is valid.</p>
  
  <p><strong>Question:</strong> How do I use decltype with a static template method?</p>