Fix decorator for certain sizes

This commit is contained in:
Vinnie Falco
2019-03-03 17:02:47 -08:00
parent 1e5b4f531d
commit 4eb137f8ea
3 changed files with 19 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
Version 227:
* Fix decorator for certain sizes
--------------------------------------------------------------------------------
Version 226: Version 226:
* Support -fno-exceptions * Support -fno-exceptions

View File

@@ -223,7 +223,7 @@ public:
decorator(F&& f) decorator(F&& f)
: base_(construct(std::forward<F>(f), : base_(construct(std::forward<F>(f),
std::integral_constant<bool, std::integral_constant<bool,
sizeof(F) <= sizeof(buf_)>{})) sizeof(F) <= Bytes>{}))
{ {
} }

View File

@@ -86,6 +86,14 @@ public:
char buf[2048]; char buf[2048];
}; };
struct goldi // just right
{
std::array<char, 48> a;
void operator()(request_type &) const
{
}
};
void void
dec_req(request_type&) dec_req(request_type&)
{ {
@@ -121,6 +129,10 @@ public:
decorator d3; decorator d3;
d3 = std::move(d2); d3 = std::move(d2);
} }
{
decorator d{goldi{}};
}
} }
void void