Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5172: Boost Optional enhancement
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-10 18:35:59
#5172: Boost Optional enhancement
--------------------------------------+-------------------------------------
Reporter: nn-mail@⦠| Owner: fcacciola
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: optional
Version: Boost Development Trunk | Severity: Optimization
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by steven_watanabe):
This shouldn't be part of optional. It's functionality is orthogonal to
that of optional.
{{{
#!c++
// Allows storing T, but does not require T to be
// a complete type except in construct/copy/destroy operations.
// Requires: size >= sizeof(T)
// size % alignment == 0
// alignment % alignment_of<T>::value == 0
template<class T, std::size_t size, std::size_t alignment>
class typed_buffer {
public:
template<class T...>
typed_buffer(T&& t...);
~typed_buffer();
typed_buffer& operator=(const typed_buffer&);
T& get();
const T& get() const;
private:
boost::aligned_storage<size, alignment> _storage;
};
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5172#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC