From 32bc4fd0758600c56fa590cd16019d4b99b7a8e4 Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Sun, 22 Oct 2023 18:29:37 +0200 Subject: [PATCH] Added default constructors for Ref and Box --- include/rfl/Box.hpp | 2 ++ include/rfl/Ref.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/rfl/Box.hpp b/include/rfl/Box.hpp index dd107edd..998be07b 100644 --- a/include/rfl/Box.hpp +++ b/include/rfl/Box.hpp @@ -18,6 +18,8 @@ class Box { return Box(std::make_unique(std::forward(_args)...)); } + Box() : ptr_(std::make_unique()) {} + Box(const Box& _other) = delete; Box(Box&& _other) = default; diff --git a/include/rfl/Ref.hpp b/include/rfl/Ref.hpp index 866791ea..90f2ba50 100644 --- a/include/rfl/Ref.hpp +++ b/include/rfl/Ref.hpp @@ -18,6 +18,8 @@ class Ref { return Ref(std::make_shared(std::forward(_args)...)); } + Ref() : ptr_(std::make_shared()) {} + Ref(const Ref& _other) = default; Ref(Ref&& _other) = default;