17 template<
typename shape_t>
18 any_shape(shape_t shape) : base_{new derived<shape_t>{std::move(shape)}}
22 any_shape(
const any_shape& that);
39 virtual std::unique_ptr<base> clone()
const = 0;
44 template<
typename shape_t>
45 class derived :
public base
48 explicit derived(shape_t shape) : shape_(
std::move(shape))
52 std::unique_ptr<base> clone()
const override
54 return std::unique_ptr<base>{
new derived{shape_}};
57 any_generator<edge_t> edges()
const override
59 return shape_.edges();
62 any_generator<shape_vertex_t> vertices()
const override
64 return shape_.vertices();
70 std::unique_ptr<base> base_;