title: scoped_allocator_adaptor seems to require allocator to be default constructed
body: <p>In my experiments with scoped_allocator_adaptor, I'm trying to pass the allocator obtained from main(..) into S1's constructor (more generally there would be multiple different types within S1 that would all use the allocator that was made available in the constructor). However, I get the compile error below indicating that the allocator should be default constructible. Can someone help explain why this might be the case? Is there some conversion taking place leading to the default constructed version of the allocator being needed?</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cassert&gt;
  #include &lt;vector&gt;
  #include &lt;scoped_allocator&gt;
  
  // Move allocator and container aliases into namepsace 
  namespace custom
  {
      template &lt;typename T&gt;
      struct MyAlloc
      {
          using value_type = T;
          MyAlloc(const std::string &amp;scope) noexcept : _scope(scope)  {} 
  
          // Rebinding allocatos to different type 
          template &lt;class U&gt; 
          MyAlloc(const MyAlloc&lt;U&gt; &amp; other) noexcept : _scope(other._scope)  {}
  
          // Allow for move operations to be noexcept
          //using is_always_equal = std::true_type;
  
          value_type*  allocate(std::size_t n) noexcept
          {
              std::cout &lt;&lt; &quot;Allocating &quot; &lt;&lt; n &lt;&lt; &quot; objects within &quot; &lt;&lt; _scope &lt;&lt; &quot; from &quot; &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
              return static_cast&lt;value_type*&gt;(::operator new (n*sizeof(value_type)));
          }
          void deallocate(value_type* p, std::size_t n) noexcept
          {
              std::cout &lt;&lt; &quot;Deallocating &quot; &lt;&lt; n &lt;&lt; &quot; objects within &quot; &lt;&lt; _scope &lt;&lt; &quot; from &quot; &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
              ::operator delete(p);
          }
          std::string _scope;
      };
  
      // Allocators compare equal to enable one allocator to de-allocate memory
      // from another
      template &lt;typename T&gt;
      bool operator==(const MyAlloc&lt;T&gt; &amp;x1, const MyAlloc&lt;T&gt; &amp;x2) noexcept
      {
          return true;
      }
  
      template &lt;typename T&gt;
      bool operator!=(const MyAlloc&lt;T&gt; &amp;x1, const MyAlloc&lt;T&gt; &amp;x2) noexcept
      {
          return !(x1 == x2);
      }
  
      template &lt;typename T&gt;
      using allocator = std::scoped_allocator_adaptor&lt;MyAlloc&lt;T&gt;&gt;;
  
      template &lt;typename T&gt; //  adaptor to propagate
      using vector = std::vector&lt;T, allocator&lt;T&gt;&gt;;
  
      template &lt;typename T&gt; 
      using bstr = std::basic_string&lt;T, std::char_traits&lt;T&gt;, allocator&lt;T&gt;&gt;;
      using string = bstr&lt;char&gt;;
  }
  
  struct S1
  {
     using allocator_type = custom::allocator&lt;std::byte&gt;;
     S1(allocator_type alloc) : str(&quot;This is a very long string indeed..&quot;, std::allocator_traits&lt;allocator_type&gt;::rebind_alloc&lt;char&gt;(alloc))
     {
        std::cout &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
     }
     S1(const S1 &amp;other, allocator_type al)  : str(other.str, std::allocator_traits&lt;allocator_type&gt;::rebind_alloc&lt;char&gt;(al))
     {
        std::cout &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
     }
     custom::string str;
  };
  
  
  
  int main()
  {
     custom::allocator&lt;std::byte&gt; sc{&quot;scope&quot;};
     custom::vector&lt;S1&gt; cv{sc};
  //   cv.emplace_back();
  }
  </code></pre>
  <p>Compile error:</p>
  <pre><code>/usr/include/c++/10/scoped_allocator: In instantiation of ‘std::scoped_allocator_adaptor&lt;_OuterAlloc, _InnerAllocs&gt;::scoped_allocator_adaptor() [with _OuterAlloc = custom::MyAlloc&lt;S1&gt;; _InnerAllocs = {}]’:
  /usr/include/c++/10/bits/stl_vector.h:626:35:   required from here
  /usr/include/c++/10/scoped_allocator:304:60: error: no matching function for call to ‘custom::MyAlloc&lt;S1&gt;::MyAlloc()’
    304 |       scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { }
        |                                                            ^
  d2.cc:17:9: note: candidate: ‘template&lt;class U&gt; custom::MyAlloc&lt;T&gt;::MyAlloc(const custom::MyAlloc&lt;U&gt;&amp;) [with U = U; T = S1]’
     17 |         MyAlloc(const MyAlloc&lt;U&gt; &amp; other) noexcept : _scope(other._scope)  {}
        |         ^~~~~~~
  d2.cc:17:9: note:   template argument deduction/substitution failed:
  In file included from d2.cc:4:
  /usr/include/c++/10/scoped_allocator:304:60: note:   candidate expects 1 argument, 0 provided
    304 |       scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { }
        |                                                            ^
  d2.cc:13:9: note: candidate: ‘custom::MyAlloc&lt;T&gt;::MyAlloc(const string&amp;) [with T = S1; std::string = std::__cxx11::basic_string&lt;char&gt;]’
     13 |         MyAlloc(const std::string &amp;scope) noexcept : _scope(scope)  {}
        |         ^~~~~~~
  d2.cc:13:9: note:   candidate expects 1 argument, 0 provided
  d2.cc:10:12: note: candidate: ‘custom::MyAlloc&lt;S1&gt;::MyAlloc(const custom::MyAlloc&lt;S1&gt;&amp;)’
     10 |     struct MyAlloc
        |            ^~~~~~~
  d2.cc:10:12: note:   candidate expects 1 argument, 0 provided
  d2.cc:10:12: note: candidate: ‘custom::MyAlloc&lt;S1&gt;::MyAlloc(custom::MyAlloc&lt;S1&gt;&amp;&amp;)’
  d2.cc:10:12: note:   candidate expects 1 argument, 0 provided
  </code></pre>