$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] is boost::container::static_vector header only library?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2019-01-16 18:35:47
Sivaram L Via Boost-users wrote:
> I am working on a embedded systems project, where we are exploring
> options to use STL containers without dynamic memory allocation,
> except std::array we cannot use any of the STL, boost container has
> static_vector for that, on browsing the code,we found that the library
> has to be built, is there a way to use this library as header only
> library?
Boost.Container's static_vector as well as STL containers are header-only.
There is no need to compile Boost.Container, since it's a header-only
library, just include your Boost header directory in your compiler
include path except if you use:
- Extended Allocators
- Some Polymorphic Memory Resources classes.
If you need some alternative, you can find similar container in
Boost.Geometry: boost::geometry::index::detail::varray
see:
https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/varray.hpp#L153
but it depends on Boost.Container so you'd need this library anyway.
Adam