{"action":"created","issue":{"url":"https://api.github.com/repos/dealii/dealii/issues/2934","repository_url":"https://api.github.com/repos/dealii/dealii","labels_url":"https://api.github.com/repos/dealii/dealii/issues/2934/labels{/name}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/2934/comments","events_url":"https://api.github.com/repos/dealii/dealii/issues/2934/events","html_url":"https://github.com/dealii/dealii/issues/2934","id":170048229,"number":2934,"title":"Replace pointer members of Triangulation by std_cxx11::unique_ptrs","user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dealii/dealii/labels/Enhancement","name":"Enhancement","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dealii/dealii/milestones/4","html_url":"https://github.com/dealii/dealii/milestones/C++11","labels_url":"https://api.github.com/repos/dealii/dealii/milestones/4/labels","id":1875615,"number":4,"title":"C++11","description":"","creator":{"login":"tamiko","id":3432917,"avatar_url":"https://avatars.githubusercontent.com/u/3432917?v=3","gravatar_id":"","url":"https://api.github.com/users/tamiko","html_url":"https://github.com/tamiko","followers_url":"https://api.github.com/users/tamiko/followers","following_url":"https://api.github.com/users/tamiko/following{/other_user}","gists_url":"https://api.github.com/users/tamiko/gists{/gist_id}","starred_url":"https://api.github.com/users/tamiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamiko/subscriptions","organizations_url":"https://api.github.com/users/tamiko/orgs","repos_url":"https://api.github.com/users/tamiko/repos","events_url":"https://api.github.com/users/tamiko/events{/privacy}","received_events_url":"https://api.github.com/users/tamiko/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2016-07-11T12:04:19Z","updated_at":"2016-08-09T21:06:59Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-08-08T23:19:28Z","updated_at":"2016-08-10T02:19:36Z","closed_at":null,"body":"As seen in #2769 (or as could of course also be discovered by looking at `include/deal.II/grid/tria.h` :-) ), class `Triangulation` has a number of raw pointer members (including, but possibly not exclusively, `levels`, `faces`, `vertex_to_boundary_id_map_1d`, `vertex_to_manifold_id_map_1d`). This is really an anachronism -- rather than managing this data ourselves, we should just be using `std_cxx11::unique_ptr` for all of these.\r\n\r\nThis might require small adjustments to the move constructor of #2769, but should generally make code simpler."},"comment":{"url":"https://api.github.com/repos/dealii/dealii/issues/comments/238748174","html_url":"https://github.com/dealii/dealii/issues/2934#issuecomment-238748174","issue_url":"https://api.github.com/repos/dealii/dealii/issues/2934","id":238748174,"user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T02:19:35Z","updated_at":"2016-08-10T02:19:35Z","body":"So this turns out to be a bit more complicated than thought. If I replace the pointer for `faces` by a `std_cxx11::unique_ptr`, I get this error:\r\n```\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/access.hpp: In static member function ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<1>, std::default_delete<dealii::internal::Triangulation::TriaFaces<1> > >]’:\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/serialization.hpp:69:5:   instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<1>, std::default_delete<dealii::internal::Triangulation::TriaFaces<1> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/serialization.hpp:128:9:   instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<1>, std::default_delete<dealii::internal::Triangulation::TriaFaces<1> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/archive/detail/iserializer.hpp:184:5:   instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<1>, std::default_delete<dealii::internal::Triangulation::TriaFaces<1> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/tests/serialization/triangulation_01.cc:178:1:   instantiated from here\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/access.hpp:118:9: error: ‘class std::unique_ptr<dealii::internal::Triangulation::TriaFaces<1>, std::default_delete<dealii::internal::Triangulation::TriaFaces<1> > >’ has no member named ‘serialize’\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/access.hpp: In static member function ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<2>, std::default_delete<dealii::internal::Triangulation::TriaFaces<2> > >]’:\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/serialization.hpp:69:5:   instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<2>, std::default_delete<dealii::internal::Triangulation::TriaFaces<2> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/serialization.hpp:128:9:   instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<2>, std::default_delete<dealii::internal::Triangulation::TriaFaces<2> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/archive/detail/iserializer.hpp:184:5:   instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = std::unique_ptr<dealii::internal::Triangulation::TriaFaces<2>, std::default_delete<dealii::internal::Triangulation::TriaFaces<2> > >]’\r\n2994: /u/bangerth/p/deal.II/2/dealii/tests/serialization/triangulation_01.cc:178:1:   instantiated from here\r\n2994: /u/bangerth/p/deal.II/2/dealii/bundled/boost-1.56.0/include/boost/serialization/access.hpp:118:9: error: ‘class std::unique_ptr<dealii::internal::Triangulation::TriaFaces<2>, std::default_delete<dealii::internal::Triangulation::TriaFaces<2> > >’ has no member named ‘serialize’\r\n```\r\nSo this appears to mean that boost 1.56 doesn't know how to serialize `std::unique_ptr`.\r\n\r\nWhat to do?"}}
{"actor":{"display_login":"bangerth"}}