GUDHI / gudhi-devel

The GUDHI library is a generic open source C++ library, with a Python interface, for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
https://gudhi.inria.fr/
MIT License
246 stars 65 forks source link

[Simplex_tree] compilation fails when activating `stable_simplex_handles` #979

Closed VincentRouvreau closed 9 months ago

VincentRouvreau commented 9 months ago

With #930 it has not been tested that most of the tests are passing with this new option.

With:

struct Simplex_tree_options_full_featured {
  ...
  static const bool stable_simplex_handles = true;
};

tests should pass.

Here, we have:

/home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/stl_algo.h: In instantiation of '_ForwardIterator std::__remove_if(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = boost::container::dtl::iterator_from_iiterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::dtl::tree_node<std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >, void*, (boost::container::tree_type_enum)0, true>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 3>, false>, false>; _Predicate = __gnu_cxx::__ops::_Iter_pred<Gudhi::Simplex_tree<SimplexTreeOptions>::rec_prune_above_filtration(Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings*, Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value) [with SimplexTreeOptions = Gudhi::Simplex_tree_options_full_featured; Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings = Gudhi::Simplex_tree_siblings<Gudhi::Simplex_tree<>, boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void> >; typename std::conditional<SimplexTreeOptions::stable_simplex_handles, boost::container::map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > >, boost::container::flat_map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > > >::type = boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void>; Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value = double]::<lambda(Gudhi::Simplex_tree<>::Dit_value_t&)> >]':
/home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/stl_algo.h:939:30:   required from '_FIter std::remove_if(_FIter, _FIter, _Predicate) [with _FIter = boost::container::dtl::iterator_from_iiterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::dtl::tree_node<std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >, void*, (boost::container::tree_type_enum)0, true>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 3>, false>, false>; _Predicate = Gudhi::Simplex_tree<SimplexTreeOptions>::rec_prune_above_filtration(Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings*, Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value) [with SimplexTreeOptions = Gudhi::Simplex_tree_options_full_featured; Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings = Gudhi::Simplex_tree_siblings<Gudhi::Simplex_tree<>, boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void> >; typename std::conditional<SimplexTreeOptions::stable_simplex_handles, boost::container::map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > >, boost::container::flat_map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > > >::type = boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void>; Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value = double]::<lambda(Gudhi::Simplex_tree<>::Dit_value_t&)>]'
/home/gudhi-devel/src/Simplex_tree/include/gudhi/Simplex_tree.h:1665:31:   required from 'bool Gudhi::Simplex_tree<SimplexTreeOptions>::rec_prune_above_filtration(Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings*, Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value) [with SimplexTreeOptions = Gudhi::Simplex_tree_options_full_featured; Gudhi::Simplex_tree<SimplexTreeOptions>::Siblings = Gudhi::Simplex_tree_siblings<Gudhi::Simplex_tree<>, boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void> >; typename std::conditional<SimplexTreeOptions::stable_simplex_handles, boost::container::map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > >, boost::container::flat_map<typename SimplexTreeOptions::Vertex_handle, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<SimplexTreeOptions> > > >::type = boost::container::map<int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> >, std::less<int>, void, void>; Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value = double]'
/home/gudhi-devel/src/Simplex_tree/include/gudhi/Simplex_tree.h:1656:21:   required from 'bool Gudhi::Simplex_tree<SimplexTreeOptions>::prune_above_filtration(Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value) [with SimplexTreeOptions = Gudhi::Simplex_tree_options_full_featured; Gudhi::Simplex_tree<SimplexTreeOptions>::Filtration_value = double]'
/home/gudhi-devel/src/Alpha_complex/include/gudhi/Alpha_complex.h:479:7:   required from 'bool Gudhi::alpha_complex::Alpha_complex<Kernel, Weighted>::create_complex(SimplicialComplexForAlpha&, Filtration_value, bool, bool) [with SimplicialComplexForAlpha = Gudhi::Simplex_tree<>; Filtration_value = double; Kernel = CGAL::Epick_d<CGAL::Dimension_tag<3> >; bool Weighted = false]'
/home/gudhi-devel/src/Alpha_complex/benchmark/Alpha_complex_3d_benchmark.cpp:49:5:   required from 'void benchmark_points_on_torus_dD(const string&) [with Kernel = CGAL::Epick_d<CGAL::Dimension_tag<3> >; std::__cxx11::string = std::__cxx11::basic_string<char>]'
/home/gudhi-devel/src/Alpha_complex/benchmark/Alpha_complex_3d_benchmark.cpp:244:102:   required from here
/home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/stl_algo.h:871:16: error: use of deleted function 'std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >& std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >::operator=(const std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >&)'
      *__result = _GLIBCXX_MOVE(*__first);
                ^
In file included from /home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/stl_algobase.h:64,
                 from /home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/char_traits.h:39,
                 from /home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/string:40,
                 from /home/miniconda3/envs/gudhi-devel/include/boost/type_index/type_index_facade.hpp:14,
                 from /home/miniconda3/envs/gudhi-devel/include/boost/type_index/stl_type_index.hpp:22,
                 from /home/miniconda3/envs/gudhi-devel/include/boost/type_index.hpp:29,
                 from /home/miniconda3/envs/gudhi-devel/include/boost/variant/variant.hpp:21,
                 from /home/miniconda3/envs/gudhi-devel/include/boost/variant.hpp:17,
                 from /home/gudhi-devel/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h:15,
                 from /home/gudhi-devel/src/Alpha_complex/benchmark/Alpha_complex_3d_benchmark.cpp:1:
/home/miniconda3/x86_64-conda-linux-gnu/include/c++/8.5.0/bits/stl_pair.h:208:12: note: 'std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >& std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >::operator=(const std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >&)' is implicitly declared as deleted because 'std::pair<const int, Gudhi::Simplex_tree_node_explicit_storage<Gudhi::Simplex_tree<> > >' declares a move constructor or move assignment operator
     struct pair
            ^~~~
make[2]: *** [src/Alpha_complex/benchmark/CMakeFiles/Alpha_complex_3d_benchmark.dir/build.make:76: src/Alpha_complex/benchmark/CMakeFiles/Alpha_complex_3d_benchmark.dir/Alpha_complex_3d_benchmark.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1743: src/Alpha_complex/benchmark/CMakeFiles/Alpha_complex_3d_benchmark.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
VincentRouvreau commented 9 months ago

Fixed on #980