Skip to content

Commit 387f493

Browse files
committed
Fix a empty class optimization for the wrapped object
1 parent 314e0a7 commit 387f493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/function2/function2.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ constexpr auto overload(T&&... callables) {
209209
namespace type_erasure {
210210
/// Store the allocator inside the box
211211
template <typename T, typename Allocator>
212-
struct box : Allocator {
212+
struct box : private Allocator {
213213
T value_;
214214

215215
explicit box(T value, Allocator allocator)

0 commit comments

Comments
 (0)