をベクトルの組を初期化します。は、私は、データ構造を持つクラスメンバー初期化子リストで
struct SimplicialManifold {
/// Default constructor with proper initialization
SimplicialManifold()
: triangulation{std::make_unique<Delaunay>()},
geometry{std::make_tuple(0, 0, 0, 0, 0, 0)} {}
std::unique_ptr<Delaunay> triangulation;
///< std::unique_ptr to the Delaunay triangulation
geometry_tuple geometry;
///< The geometric structure of the triangulation
};
上記のコードはで動作します。私はデフォルトコンストラクタで初期化したい
using Delaunay = CGAL::Delaunay_triangulation_3<K, Tds>;
using Cell_handle = Delaunay::Cell_handle;
using Vertex_handle = Delaunay::Vertex_handle;
using Edge_handle = std::tuple<Cell_handle, std::uintmax_t, std::uintmax_t>;
using geometry_tuple = std::tuple<std::vector<Cell_handle>,
std::vector<Cell_handle>,
std::vector<Cell_handle>,
std::vector<Edge_handle>,
std::uintmax_t,
std::vector<Vertex_handle>>;
アップルLLVMのバージョン7.3.0(打ち鳴らす-703.0.29)が、テンプレートコンパイラグーのトンとGCC 5.2に失敗します。
../src/S3Triangulation.h: In constructor ‘SimplicialManifold::SimplicialManifold()’../src/S3Triangulation.h:493:55: error: no matching function for call to
‘std::tuple<std::vector<CGAL::CCC_internal::CCC_iterator<CGAL::Concurrent_compact_container<CGAL::Triangulation_cell_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_vertex_base_3<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Triangulation_cell_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<void> > >, CGAL::Parallel_tag> > > >, tbb::scalable_allocator<CGAL::Triangulation_cell_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_vertex_base_3<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Triangulation_cell_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<void> > >, CGAL::Parallel_tag> > > > > >, false>, std::allocator<CGAL::CCC_internal::CCC_iterator<CGAL::Concurrent_compact_container<CGAL::Triangulation_cell_base_with_info_3<long unsigned int, CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick,
私は初期化子リストを見
(問題のコードは、行467から始まるhttps://github.com/acgetchell/CDT-plusplus/blob/functional/src/S3Triangulation.hである)が、これらは動作しません。この操作を行うと、GCCを幸せにする方法について
geometry{std::initializer_list<std::vector<Cell_handle>,
std::vector<Cell_handle>,
std::vector<Cell_handle>,
std::vector<Edge_handle>,
std::uintmax_t,
std::vector<Vertex_handle>>({0, 0, 0, 0, 0, 0})
} {}
提案を?
-std = C++ 11フラグでコンパイルしましたか? – bashrc
はい、実際には-std = C++ 1y –
'tuple'は値を初期化しますが、それは余分なものです。 –