title: std::variant implementation bug (Clang 4.0.1)
body: <p>Here's my basic test code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;variant&gt;
  
  int main(int argc, char** argv) {
      std::variant&lt;int&gt; v{5};
      std::cout &lt;&lt; std::get&lt;0&gt;(v) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>When I compile it using Clang as follow: <code>clang++ -std=c++1z -g Sources/main.cpp</code>
  I'm getting these errors:</p>
  
  <pre><code>In file included from Sources/main.cpp:2:
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:235:46: error: cannot cast 'std::variant&lt;int&gt;' to its private base class
        'std::__detail::__variant::_Variant_storage&lt;true, int&gt;'
        return __get(std::in_place_index&lt;_Np&gt;, std::forward&lt;_Variant&gt;(__v)._M_u);
                                               ^
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:1192:35: note: in instantiation of function template specialization
        'std::__detail::__variant::__get&lt;0, std::variant&lt;int&gt; &amp;&gt;' requested here
        return __detail::__variant::__get&lt;_Np&gt;(__v);
                                    ^
  Sources/main.cpp:6:20: note: in instantiation of function template specialization 'std::get&lt;0, int&gt;' requested here
          std::cout &lt;&lt; std::get&lt;0&gt;(v) &lt;&lt; std::endl;
                            ^
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:878:7: note: constrained by private inheritance here
      : private __detail::__variant::_Variant_base&lt;_Types...&gt;,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:235:74: error: '_M_u' is a private member of
        'std::__detail::__variant::_Variant_storage&lt;true, int&gt;'
        return __get(std::in_place_index&lt;_Np&gt;, std::forward&lt;_Variant&gt;(__v)._M_u);
                                                                           ^
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:878:7: note: constrained by private inheritance here
      : private __detail::__variant::_Variant_base&lt;_Types...&gt;,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/variant:377:34: note: member is declared here
        _Variadic_union&lt;_Types...&gt; _M_u;
  </code></pre>
  
  <p>But when I compile with GCC, with the same options, I haven't any errors, and I get the right output (<code>5</code>).</p>
  
  <p>So I would like to know if it is really an implementation bug or if it comes from me.</p>