title: Member detection using void_t
body: <p>For member detection in C++14 I used code based on the example <a href="http://en.cppreference.com/w/cpp/types/void_t">here</a>, but it does no seem to work.</p>
  
  <p>A complete example:</p>
  
  <pre><code>#include &lt;string&gt;
  
  template &lt;typename...&gt;
  using void_t = void;
  
  template &lt;typename, typename = void&gt; class HasMember_substr : public std::false_type {};
  template &lt;typename T&gt; class HasMember_substr&lt;T, void_t&lt;typename T::substr&gt;&gt; : public std::true_type {};
  
  template &lt;typename, typename = void&gt; class HasMember_fff : public std::false_type {};
  template &lt;typename T&gt; class HasMember_fff&lt;T, void_t&lt;typename T::fff&gt;&gt; : public std::true_type {};
  
  static_assert(HasMember_substr&lt;std::string&gt;::value, "");
  static_assert(!HasMember_fff&lt;std::string&gt;::value, "");
  
  int main() { return 0; }
  </code></pre>
  
  <p>Compiled using <code>clang++ --std=c++14 test.cpp</code> on OS X, compiler version (<code>clang++ --version</code>): <code>Apple LLVM version 7.0.2 (clang-700.1.81)</code></p>
  
  <p>The second assert succeeds, but the first fails. Why? I have also tried using <code>decltype(T::substr)</code> instead of <code>typename T::subset</code>, with the same result.</p>