title: using an boost::iostreams::array_sink with a boost::array<char, n>
body: <p>The example (reproduced below <a href="http://theboostcpplibraries.com/boost.iostreams-devices" rel="nofollow">from here</a>) shows that, using a stream of array_sink, I can get output stream functionality on a char array.</p>
  
  <pre><code>#include &lt;boost/iostreams/device/array.hpp&gt;
  #include &lt;boost/iostreams/stream.hpp&gt;
  #include &lt;iostream&gt;
  
  using namespace boost::iostreams;
  
  int main()
  {
      char buffer[16];
      array_sink sink{buffer};
      stream&lt;array_sink&gt; os{sink};
      os &lt;&lt; "Boost" &lt;&lt; std::flush;
      std::cout.write(buffer, 5);
  }
  </code></pre>
  
  <p>What I need though is to get a stream of array_sink from a boost::array.
  e.g.</p>
  
  <pre><code>...
  using namespace boost::iostreams;
  
  boost::array&lt;char, 16384&gt; headerBuf;
  
  array_sink          sink    {headerBuf};
  stream&lt;array_sink&gt;  os      {sink};
  
  os &lt;&lt; "somedata";
  </code></pre>
  
  <p>when compiling this under gcc 4.4.7, I get the error:</p>
  
  <pre><code>error: no matching function for call to ‘boost::iostreams::basic_array_sink&lt;char&gt;::basic_array_sink(&lt;brace-enclosed initializer list&gt;)’
  </code></pre>
  
  <p>I'm guessing the initializer list may not be supported by gcc 4.4.7, although in general, is there an alternative method of initializing an array_sink with a boost::array ?</p>