Subject: [Boost-bugs] [Boost C++ Libraries] #11164: Graph adjacency_list, add_vertex compile error on clang 3.6
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-04-02 21:19:51
#11164: Graph adjacency_list, add_vertex compile error on clang 3.6
------------------------------+----------------------
Reporter: dstoeckel@⦠| Owner: jewillco
Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost 1.57.0 | Severity: Problem
Keywords: |
------------------------------+----------------------
I have an issue similar to #10382. When compiling the following program
{{{
#include <boost/graph/adjacency_list.hpp>
struct Payload {
Payload() = default;
Payload(const Payload&) {};
Payload& operator=(const Payload&) { return *this; };
};
struct PayloadD : public Payload {
};
class Props {
public:
PayloadD payload;
};
int main(int argc, char** argv)
{
using boost::adjacency_list;
using boost::vecS;
using boost::directedS;
typedef adjacency_list<vecS, vecS, directedS, Props> Graph;
Graph graph;
boost::add_vertex(graph);
return 0;
}
}}}
Using clang 3.6 I get the error message:
{{{
/usr/bin/../lib64/gcc/x86_64-unknown-linux-
gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_construct.h:75:38: error:
call to implicitly-deleted copy constructor of
'boost::detail::stored_edge_property<unsigned long, boost::no_property>'
{ ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...);
}
...
/usr/include/boost/graph/detail/adjacency_list.hpp:317:7: note: copy
constructor is implicitly deleted because 'stored_edge_property<unsigned
long, boost::no_property>' has a user-declared move constructor
stored_edge_property(self&& x) = default;
}}}
The same program compiles fine with gcc 4.8.2, 4.9.2, and clang 3.5.
The attached patch changes stored_edge_property such that it always
creates a custom copy constructor and copy assignment operator. With this
changes clang 3.6 can build the program.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11164> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC