Skip to content

Commit 7dd0d22

Browse files
fix: helmet.hpp: pimpl implementation fix.
Signed-off-by: Amlal El Mahrouss <[email protected]>
1 parent 73b8179 commit 7dd0d22

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/boost/http_proto/server/helmet.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ struct helmet_options
4141
class helmet
4242
{
4343
struct impl;
44-
std::unique_ptr<impl> impl_;
45-
44+
impl* impl_;
45+
4646
public:
4747
/**
4848
@brief Builds an helmet and compute its options for caching purposes.
@@ -54,6 +54,9 @@ class helmet
5454
BOOST_HTTP_PROTO_DECL
5555
~helmet();
5656

57+
helmet& operator=(helmet&&);
58+
helmet(helmet&&);
59+
5760
/**
5861
@brief Iterates over cachedHeaders and apply its rules to the response params.
5962
@param p route parameter argument

src/server/helmet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ struct helmet::impl
8181
helmet::
8282
helmet(
8383
helmet_options helmet_options)
84+
: impl_(new impl())
8485
{
85-
impl_ = std::make_unique<impl>();
8686
impl_->options_ = std::move(helmet_options);
8787

8888
std::for_each(impl_->options_.headers.begin(), impl_->options_.headers.end(),

0 commit comments

Comments
 (0)