CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.68k stars 1.35k forks source link

'get_parameter': no matching overloaded function found #8141

Open Iirq opened 2 months ago

Iirq commented 2 months ago

The code:

#include <BasicGeometry/CommonDef.h>
#include <CGALExtensions/GenerationUtils.h>
#include <CGALExtensions/Mesh.h>
#include <CGALExtensions/MeshCurveUtils.h>
#include <CGALExtensions/MeshUtils.h>
#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
#include <CGAL/Named_function_parameters.h>

#include <TestUtils/TestsWithTraces.h>

#include <gtest/gtest.h>

using namespace cgalext;

/*
namespace cgalext
{
using BaseMesh = CGAL::Surface_mesh<Point3D>;

template <typename Kernel>
class Rigid3;

class Mesh : public BaseMesh
{
public:
    using Base = BaseMesh;

    using VertexMap = Property_map<Vertex_index, int>;
    using FaceMap = Property_map<Face_index, int>;

    using Face_index = Base::Face_index;

    using FaceIndexPair = std::pair<Face_index, Face_index>;
    using HalfedgePair = std::pair<Halfedge_index, Halfedge_index>;
    using HalfedgesMap = std::unordered_map<Halfedge_index, Halfedge_index>;
    using Halfedges = std::vector<Halfedge_index>;
    using Vertices = std::vector<Vertex_index>;
    using Edges = std::vector<Edge_index>;
    using Faces = std::vector<Face_index>;
    using FaceSet = std::unordered_set<Face_index>;
    using VertexSet = std::unordered_set<Vertex_index>;
    using EdgeSelector = Property_map<Edge_index, bool>;
    using FaceSelector = Property_map<Face_index, bool>;
    using HalfedgeSelector = Property_map<Halfedge_index, bool>;
    using VertexSelector = Property_map<Vertex_index, bool>;

    .....
};
} // namespace cgalext
*/

Mesh filterMeshTest(
    const Mesh& mesh,
    const std::vector<Mesh::Face_index>& selectedFaces,
    std::vector<Mesh::Face_index>* inverseMap)
{
    using namespace CGAL;

    class OutputIterator
    {
    public:
        typedef std::output_iterator_tag iterator_category;
        typedef void value_type;
        typedef void difference_type;
        typedef void pointer;
        typedef void reference;

        explicit OutputIterator(){};

        using Target = std::pair<Mesh::Face_index, Mesh::Face_index>;

        Target& operator*() { return m_v; }

        OutputIterator& operator++() { return *this; }
        OutputIterator& operator++(int) { return *this; }

    private:
        Target m_v;
    };

    using SourceMesh = Face_filtered_graph<BaseMesh>;
    SourceMesh filteredGraph(mesh.base(), selectedFaces);

    Mesh filteredMesh;

    using SourceFaceDescriptor = boost::graph_traits<SourceMesh>::face_descriptor;
    using TargetFaceDescriptor = Mesh::Face_index;
    using SourceTargetPair = std::pair<SourceFaceDescriptor, TargetFaceDescriptor>;

    if (inverseMap)
    {
        *inverseMap = std::vector<Mesh::Face_index>(filteredGraph.number_of_faces(), Mesh::null_face());

        OutputIterator iterator;
        copy_face_graph(filteredGraph, filteredMesh.base(), iterator, Emptyset_iterator());
    }
    else
    {
        copy_face_graph(filteredGraph, filteredMesh.base());
    }
    filteredMesh.set_vertex_halfedge_to_border_halfedge(); // this step is important for other operations
    return filteredMesh;
}

TEST(FilterMeshTest, FilterMeshTestA)
{
    std::vector<Mesh::Face_index> selectedFaces;
    Mesh mesh;
    filterMeshTest(mesh, selectedFaces, nullptr);
}

does not compile:

1>------ Build started: Project: CGALExtensionsTests, Configuration: Release x64 ------
1>MeshUtilsTests.cpp
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(335,46): error C2672: 'get_parameter': no matching overloaded function found
1>C:\git\dev4\Source\Modules\CGALExtensions\Test\MeshUtilsTests.cpp(99): message : see reference to function template instantiation 'void CGAL::copy_face_graph<SourceMesh,cgalext::BaseMesh,filterMeshTest::OutputIterator,CGAL::Emptyset_iterator>(const SourceMesh &,TargetMesh &,const NamedParameters1 &,const NamedParameters2 &)' being compiled
1>        with
1>        [
1>            SourceMesh=SourceMesh,
1>            TargetMesh=cgalext::BaseMesh,
1>            NamedParameters1=filterMeshTest::OutputIterator,
1>            NamedParameters2=CGAL::Emptyset_iterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(335,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,65): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(335,29): error C2672: 'choose_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(281): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'const D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(287): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &&)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(293): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'T &CGAL::parameters::choose_parameter(T &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(299): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(305): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(530): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(336,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(536): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(337,46): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(337,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,65): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(337,29): error C2672: 'choose_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(281): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'const D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(287): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &&)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(293): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'T &CGAL::parameters::choose_parameter(T &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(299): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(305): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(530): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(338,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(536): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(339,46): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(339,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,65): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(339,29): error C2672: 'choose_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(281): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'const D &CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(287): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,D &&)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(293): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'T &CGAL::parameters::choose_parameter(T &,D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(299): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,const D &)': expects 2 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(305): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(530): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(340,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 1 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(536): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(341,46): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(341,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters1'
1>        with
1>        [
1>            NamedParameters1=filterMeshTest::OutputIterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(341,29): error C2672: 'choose_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(342,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(536): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(342,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(530): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(342,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &)': expects 1 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(318): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(342,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &)': expects 1 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(312): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(343,46): error C2672: 'get_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(343,1): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'const NamedParameters2'
1>        with
1>        [
1>            NamedParameters2=CGAL::Emptyset_iterator
1>        ]
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(343,29): error C2672: 'choose_parameter': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(344,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(536): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(344,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &,Dynamic_tag,PolygonMesh &)': expects 3 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(530): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(344,1): error C2780: 'const T &CGAL::parameters::choose_parameter(const T &)': expects 1 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(318): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(344,1): error C2780: 'D CGAL::parameters::choose_parameter(const CGAL::internal_np::Param_not_found &)': expects 1 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(312): message : see declaration of 'CGAL::parameters::choose_parameter'
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(334,13): error C2672: 'CGAL::internal::copy_face_graph_impl': no matching overloaded function found
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(344,1): error C2780: 'void CGAL::internal::copy_face_graph_impl(const SourceMesh &,TargetMesh &,V2V,H2H,F2F,Src_vpm,Tgt_vpm)': expects 7 arguments - 2 provided
1>C:\.conan\5f7d82\1\include\CGAL/boost/graph/copy_face_graph.h(36): message : see declaration of 'CGAL::internal::copy_face_graph_impl'
1>Done building project "CGALExtensionsTests.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Environment

afabri commented 2 months ago

We provide an example for derivation from Surface_mesh here. Maybe this can help.

Iirq commented 2 months ago

Mesh realization have not matter here. if we are simplifying:

    if (inverseMap)
    {
        *inverseMap = std::vector<Mesh::Face_index>(filteredGraph.number_of_faces(), Mesh::null_face());

        OutputIterator iterator;

        //copy_face_graph(filteredGraph, filteredMesh.base(), iterator, Emptyset_iterator());
        parameters::get_parameter(iterator, internal_np::face_to_face_output_iterator);
    }

the result will be: 1>MeshUtilsTests.cpp 1>C:\git\dev4\Source\Modules\CGALExtensions\Test\MeshUtilsTests.cpp(101,21): error C2672: 'CGAL::parameters::get_parameter': no matching overloaded function found 1>C:\git\dev4\Source\Modules\CGALExtensions\Test\MeshUtilsTests.cpp(101,86): error C2784: 'internal_np::Get_param<CGAL::internal_np::Named_params_impl<T,Tag,Base>,Query_tag>::type CGAL::parameters::get_parameter(const CGAL::Named_function_parameters<T,Tag,Base> &,Query_tag)': could not deduce template argument for 'const CGAL::Named_function_parameters<T,Tag,Base> &' from 'filterMeshTest::OutputIterator' 1>C:.conan\5f7d82\1\include\CGAL/Named_function_parameters.h(265): message : see declaration of 'CGAL::parameters::get_parameter'

so

parameters::get_parameter can't build Named_function_parameters from iterator

and I don't know how to instantiate Named_function_parameters<T,Tag,Base> np1(iterator);

what types should be T,Tag,Base? I could not find any example with copy_face_graph(sm,tm,np1,np2) ; the only example for copy_face_graph(sm,tm) exists. Does anybody compile form with four arguments?

lrineau commented 2 months ago

How is defined the type Mesh? That is probably the source of the issue. It seems you derive a class from CGAL::Surface_mesh<Point3D>, and Andreas pointed out an example showing the extra steps that are needed to derive from that class template.