You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcow/src/area.cpp

17 lines
464 B

4 years ago
#include <cow/area.hpp>
4 years ago
namespace _cow_util {
Area::Area(size_t sz) : _area(std::make_unique<Cow>(sz)){}
Area::Area(const Area& copy) :
_area(std::make_unique<Cow::Fake>(*copy._area.get())){}
Area::Area(Area&& move) :
_area(std::move(*const_cast<std::unique_ptr<Cow>*>(&move._area))){}
Area::~Area(){}
4 years ago
Area::Area(Cow&& r) :
_area(std::make_unique<Cow>(std::move(r))){}
Area::Area(const Cow& r) :
_area(std::make_unique<Cow::Fake>(r.clone())){}
}