boost::noncopyable is already base class of State, hence we created this triangle:
struct A { int a; }; // noncopyable in our case
struct B : A { };
struct C : B, A { }; // direct A can't be referred to!
http://stackoverflow.com/questions/4118412/inaccessible-direct-base-caused-by-multiple-inheritance
see also boost-ticket#11141 that copyable is probably not working, with current compiler optimizations https://svn.boost.org/trac/boost/ticket/11141
e.g.
Add copy constructor to State:
--- a/src/model/state.h
+++ b/src/model/state.h
@@ -90,6 +90,8 @@ namespace dss {
State(boost::shared_ptr<Group> _group);
State(eStateType _type, const std::string& _name, const std::string& _identifier);
+ State(const State &other) {}
+
virtual ~State();
--- a/tests/modeltests.cpp
+++ b/tests/modeltests.cpp
+BOOST_AUTO_TEST_CASE(testCopyState) {
+ State s("foo");
+ State b = s;
+}
This code compiles for:
$ g++ --version
g++ (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.