From 046d1cd67061e7a3a67d76ea2b834dbe355822d6 Mon Sep 17 00:00:00 2001 From: Kautenja Date: Wed, 19 Feb 2020 18:56:25 -0600 Subject: [PATCH] disable copy constructors --- include/structures.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/structures.hpp b/include/structures.hpp index 492b1d3..b7a085e 100644 --- a/include/structures.hpp +++ b/include/structures.hpp @@ -94,6 +94,10 @@ struct Order : DLL::Node { arrival(arrival_), execution(execution_), limit(nullptr) { } + + private: + /// disable the copy constructor + Order(const Order& other) { } }; /// A representation of a price limit with a FIFO queue of orders. @@ -125,6 +129,10 @@ struct Limit : BST::Node { volume(order->size), order_head(order), order_tail(order) { } + + private: + /// disable the copy constructor + Limit(const Limit& other) { } }; } // namespace LOB