1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Array Container</title> 5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../cpp2011.html" title="C++ 2011 Support"> 9<link rel="prev" href="variadic.html" title="Variadic Templates"> 10<link rel="next" href="atomic.html" title="Atomics"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="variadic.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cpp2011.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="atomic.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="boost_asio.overview.cpp2011.array"></a><a class="link" href="array.html" title="Array Container">Array Container</a> 28</h4></div></div></div> 29<p> 30 Where the standard library provides <code class="computeroutput">std::array<></code>, Boost.Asio: 31 </p> 32<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 33<li class="listitem"> 34 Provides overloads for the <a class="link" href="../../reference/buffer.html" title="buffer">buffer()</a> 35 function. 36 </li> 37<li class="listitem"> 38 Uses it in preference to <code class="computeroutput">boost::array<></code> for the 39 <a class="link" href="../../reference/ip__address_v4/bytes_type.html" title="ip::address_v4::bytes_type">ip::address_v4::bytes_type</a> 40 and <a class="link" href="../../reference/ip__address_v6/bytes_type.html" title="ip::address_v6::bytes_type">ip::address_v6::bytes_type</a> 41 types. 42 </li> 43<li class="listitem"> 44 Uses it in preference to <code class="computeroutput">boost::array<></code> where a 45 fixed size array type is needed in the implementation. 46 </li> 47</ul></div> 48<p> 49 Support for <code class="computeroutput">std::array<></code> is automatically enabled for 50 <code class="literal">g++</code> 4.3 and later, when the <code class="literal">-std=c++0x</code> 51 or <code class="literal">-std=gnu++0x</code> compiler options are used, as well as 52 for Microsoft Visual C++ 10. It may be disabled by defining <code class="computeroutput">BOOST_ASIO_DISABLE_STD_ARRAY</code>, 53 or explicitly enabled for other compilers by defining <code class="computeroutput">BOOST_ASIO_HAS_STD_ARRAY</code>. 54 </p> 55</div> 56<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 57<td align="left"></td> 58<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 59 Kohlhoff<p> 60 Distributed under the Boost Software License, Version 1.0. (See accompanying 61 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 62 </p> 63</div></td> 64</tr></table> 65<hr> 66<div class="spirit-nav"> 67<a accesskey="p" href="variadic.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cpp2011.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="atomic.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 68</div> 69</body> 70</html> 71