# HG changeset patch # User Gabriel Gouvine # Date 1485545713 -3600 # Node ID 0898f3371d1d86d493ced1091813482fabe2c1d0 # Parent f51c01a1b88eead63515a8b22f6f380595245a42 Forbid copy construction of StaticDigraph diff -r f51c01a1b88e -r 0898f3371d1d lemon/static_graph.h --- a/lemon/static_graph.h Mon Nov 16 08:46:42 2015 +0100 +++ b/lemon/static_graph.h Fri Jan 27 20:35:13 2017 +0100 @@ -29,6 +29,7 @@ namespace lemon { class StaticDigraphBase { + public: StaticDigraphBase() @@ -296,6 +297,14 @@ /// /// \sa concepts::Digraph class StaticDigraph : public ExtendedStaticDigraphBase { + + private: + /// Graphs are \e not copy constructible. Use DigraphCopy instead. + StaticDigraph(const StaticDigraph &) : ExtendedStaticDigraphBase() {}; + /// \brief Assignment of a graph to another one is \e not allowed. + /// Use DigraphCopy instead. + void operator=(const StaticDigraph&) {} + public: typedef ExtendedStaticDigraphBase Parent;