title: C++ constexpr inheriting constructor
body: <p>The following code compiles with GCC 8.2 but not with Clang 6.0.1:</p>
  
  <pre><code>// A struct named Foo.
  struct Foo
  {
    // Data member of type 'int'.
    int val;
  
    // Default constructor (constexpr).
    constexpr Foo() noexcept : val(0) {}
  };
  
  // A struct named Bar.
  struct Bar : Foo
  {
    // Make use of the constructors declared in Foo.
    using Foo::Foo;
  
    // A constructor taking an object of type Foo.
    // COMMENTING THIS CONSTRUCTOR SOLVE THE COMPILATION ISSUE.
    constexpr Bar(Foo const obj) noexcept : Foo(obj) {}
  };
  
  
  // A struct named Test.
  struct Test
  {
    // Data member of type 'Bar'.
    Bar bar;
  
    // A defaulted default constructor.
    constexpr Test() noexcept = default;
  };
  
  
  // Main function.
  int main() { return 0; }
  </code></pre>
  
  <p>Clang fails with the following message:</p>
  
  <blockquote>
    <p>error: defaulted definition of default constructor is not constexpr<br>
    constexpr Test() noexcept = default;</p>
  </blockquote>
  
  <p>I would like to understand why Clang is rejecting this code.</p>