basic_fields does not support fancy pointers

fix #896
This commit is contained in:
Vinnie Falco
2017-11-20 12:12:06 -08:00
parent d203bf342b
commit 25c5f2e844
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Version 145:
* Refactor HTTP async read composed operations * Refactor HTTP async read composed operations
* null_buffers is deprecated * null_buffers is deprecated
* Version 124 works with Boost 1.65.1 and earlier * Version 124 works with Boost 1.65.1 and earlier
* basic_fields does not support fancy pointers
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -56,6 +56,11 @@ class basic_fields
: private beast::detail::empty_base_optimization<Allocator> : private beast::detail::empty_base_optimization<Allocator>
#endif #endif
{ {
// Fancy pointers are not supported
static_assert(std::is_pointer<typename
std::allocator_traits<Allocator>::pointer>::value,
"Allocator must use regular pointers");
friend class fields_test; // for `header` friend class fields_test; // for `header`
static std::size_t constexpr max_static_buffer = 4096; static std::size_t constexpr max_static_buffer = 4096;