{"action":"opened","issue":{"url":"https://api.github.com/repos/CGAL/cgal/issues/1061","repository_url":"https://api.github.com/repos/CGAL/cgal","labels_url":"https://api.github.com/repos/CGAL/cgal/issues/1061/labels{/name}","comments_url":"https://api.github.com/repos/CGAL/cgal/issues/1061/comments","events_url":"https://api.github.com/repos/CGAL/cgal/issues/1061/events","html_url":"https://github.com/CGAL/cgal/issues/1061","id":152770320,"number":1061,"title":"SFINAE issue in BGL for Surface_mesh","user":{"login":"lrineau","id":5746675,"avatar_url":"https://avatars.githubusercontent.com/u/5746675?v=3","gravatar_id":"","url":"https://api.github.com/users/lrineau","html_url":"https://github.com/lrineau","followers_url":"https://api.github.com/users/lrineau/followers","following_url":"https://api.github.com/users/lrineau/following{/other_user}","gists_url":"https://api.github.com/users/lrineau/gists{/gist_id}","starred_url":"https://api.github.com/users/lrineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrineau/subscriptions","organizations_url":"https://api.github.com/users/lrineau/orgs","repos_url":"https://api.github.com/users/lrineau/repos","events_url":"https://api.github.com/users/lrineau/events{/privacy}","received_events_url":"https://api.github.com/users/lrineau/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CGAL/cgal/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/CGAL/cgal/labels/Pkg::BGL","name":"Pkg::BGL","color":"bfe5bf"},{"url":"https://api.github.com/repos/CGAL/cgal/labels/Pkg::Surface_mesh","name":"Pkg::Surface_mesh","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/CGAL/cgal/milestones/14","html_url":"https://github.com/CGAL/cgal/milestones/4.8.1","labels_url":"https://api.github.com/repos/CGAL/cgal/milestones/14/labels","id":1619759,"number":14,"title":"4.8.1","description":"","creator":{"login":"lrineau","id":5746675,"avatar_url":"https://avatars.githubusercontent.com/u/5746675?v=3","gravatar_id":"","url":"https://api.github.com/users/lrineau","html_url":"https://github.com/lrineau","followers_url":"https://api.github.com/users/lrineau/followers","following_url":"https://api.github.com/users/lrineau/following{/other_user}","gists_url":"https://api.github.com/users/lrineau/gists{/gist_id}","starred_url":"https://api.github.com/users/lrineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrineau/subscriptions","organizations_url":"https://api.github.com/users/lrineau/orgs","repos_url":"https://api.github.com/users/lrineau/repos","events_url":"https://api.github.com/users/lrineau/events{/privacy}","received_events_url":"https://api.github.com/users/lrineau/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":12,"state":"open","created_at":"2016-03-03T10:10:54Z","updated_at":"2016-05-03T13:14:08Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-05-03T13:14:08Z","updated_at":"2016-05-03T13:14:08Z","closed_at":null,"body":"@maxGimeno @afabri I have managed to reduce the compilation error to the following code:\r\n```C++\r\n#define BUG 1\r\n\r\n#if BUG\r\n#  include <CGAL/boost/graph/properties_Surface_mesh.h>\r\n#endif\r\n\r\n#include <boost/variant.hpp>\r\n\r\nnamespace CGAL {\r\n  struct A {};\r\n  struct B {};\r\n}\r\n\r\nnamespace boost {\r\n\r\n  void func() {\r\n    const boost::variant<CGAL::A, CGAL::B> v;\r\n    get<const CGAL::A>(&v);\r\n  }\r\n}\r\n\r\nint main()\r\n{\r\n  boost::func();\r\n}\r\n```\r\n(See https://gist.github.com/lrineau/4e723302e081842c20e1ed02a1c59b4c)\r\n\r\nThat code does not compile with CGAL-4.7, CGAL-4.8, or `master`. If the macro `BUG` is defined to 0, then the header `<CGAL/boost/graph/properties_Surface_mesh.h>` is not included, and the code compiles.\r\n\r\nThe compilation error:\r\n```\r\nIn file included from /usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++allocator.h:33:0,\r\n                 from /usr/include/c++/5.3.1/bits/allocator.h:46,\r\n                 from /usr/include/c++/5.3.1/ext/alloc_traits.h:38,\r\n                 from /usr/include/c++/5.3.1/bits/stl_construct.h:61,\r\n                 from /usr/include/c++/5.3.1/bits/stl_tempbuf.h:60,\r\n                 from /usr/include/c++/5.3.1/bits/stl_algo.h:62,\r\n                 from /usr/include/c++/5.3.1/algorithm:62,\r\n                 from /home/lrineau/Git/cgal/Installation/include/CGAL/config.h:331,\r\n                 from /home/lrineau/Git/cgal/STL_Extension/include/CGAL/assertions.h:25,\r\n                 from /home/lrineau/Git/cgal/BGL/include/CGAL/boost/graph/properties_Surface_mesh.h:24,\r\n                 from /home/lrineau/tmp/test/essai.cpp:4:\r\n/usr/include/c++/5.3.1/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const CGAL::A>’:\r\n/usr/include/c++/5.3.1/bits/allocator.h:92:11:   required from ‘class std::allocator<const CGAL::A>’\r\n/usr/include/c++/5.3.1/ext/alloc_traits.h:172:38:   required from ‘struct __gnu_cxx::__alloc_traits<std::allocator<const CGAL::A> >’\r\n/usr/include/c++/5.3.1/bits/stl_vector.h:75:28:   required from ‘struct std::_Vector_base<const CGAL::A, std::allocator<const CGAL::A> >’\r\n/usr/include/c++/5.3.1/bits/stl_vector.h:214:11:   required from ‘class std::vector<const CGAL::A, std::allocator<const CGAL::A> >’\r\n/home/lrineau/Git/cgal/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h:337:45:   required from ‘class CGAL::Surface_mesh<const CGAL::A>::Property_array<const CGAL::A>’\r\n/home/lrineau/Git/cgal/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h:649:7:   required from ‘class CGAL::Surface_mesh<const CGAL::A>::Property_map<CGAL::SM_Vertex_index, const CGAL::A>’\r\n/home/lrineau/Git/cgal/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h:2429:39:   required from ‘class CGAL::Surface_mesh<const CGAL::A>’\r\n/home/lrineau/Git/cgal/BGL/include/CGAL/boost/graph/graph_traits_Surface_mesh.h:50:37:   required from ‘struct boost::graph_traits<CGAL::Surface_mesh<const CGAL::A> >’\r\n/home/lrineau/Git/cgal/BGL/include/CGAL/boost/graph/properties_Surface_mesh.h:233:33:   required by substitution of ‘template<class Point> Point& boost::get(boost::vertex_point_t, const CGAL::Surface_mesh<Point_3>&, typename boost::graph_traits<CGAL::Surface_mesh<Point_3> >::vertex_descriptor) [with Point = const CGAL::A]’\r\n/home/lrineau/tmp/test/essai.cpp:18:26:   required from here\r\n/usr/include/c++/5.3.1/ext/new_allocator.h:93:7: error: ‘const _Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference) const [with _Tp = const CGAL::A; __gnu_cxx::new_allocator<_Tp>::const_pointer = const CGAL::A*; __gnu_cxx::new_allocator<_Tp>::const_reference = const CGAL::A&]’ cannot be overloaded\r\n       address(const_reference __x) const _GLIBCXX_NOEXCEPT\r\n       ^\r\n/usr/include/c++/5.3.1/ext/new_allocator.h:89:7: error: with ‘_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = const CGAL::A; __gnu_cxx::new_allocator<_Tp>::pointer = const CGAL::A*; __gnu_cxx::new_allocator<_Tp>::reference = const CGAL::A&]’\r\n       address(reference __x) const _GLIBCXX_NOEXCEPT\r\n       ^\r\n```\r\n\r\nThere is a hard error in a substitution of parameters for a `get` function in  `<CGAL/boost/graph/properties_Surface_mesh.h>`.\r\n"}}