Closed rayjs closed 7 years ago
Hi!
Yea, it looks like the generic lambda is the problem. It seems like gcc-4.8.5 doesn't support that yet. So the statement in the README.md that eos works with gcc-4.8.4 is actually not true anymore - I'll update it. In fact the minimum version that we test on travis is gcc-4.9.
I recommend you install a newer gcc version. This can easily be done side-by-side to your current one. Just add the ubuntu-toolchain-r ppa and install the g++-5 package.
Thanks for reporting.
Updated readme in 182dd210651b71650175ba1cc5ac2478ac20975f.
Hi Patrik,
Thanks for the quick reply. I suspected so and I did try with gcc -4.9 as well gcc version 4.9.4 (Ubuntu 4.9.4-2ubuntu1~14.04.1)
I got the following error. Is gcc-5 the only possible option or gcc-4.8.4?
[ 33%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:21:0: /home/sj/Documents/codes/eos/include/eos/core/LandmarkMapper.hpp:128:14: error: ‘size’ function uses ‘auto’ type specifier without trailing return type auto size() const ^ /home/sj/Documents/codes/eos/include/eos/core/LandmarkMapper.hpp:128:14: note: deduced return type only available with -std=c++1y or -std=gnu++1y In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp: In function ‘std::tuple<std::vector<cv::Vec<float, 2>, std::allocator<cv::Vec<float, 2> > >, std::vector<cv::Vec<float, 4>, std::allocator<cv::Vec<float, 4> > >, std::vector<int, std::allocator<int> > > eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)’: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:75: warning: use of ‘auto’ in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:26:0, from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:34, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/RenderingParameters.hpp: At global scope: /home/sj/Documents/codes/eos/include/eos/fitting/RenderingParameters.hpp:137:25: error: ‘get_camera_type’ function uses ‘auto’ type specifier without trailing return type auto get_camera_type() const { ^ /home/sj/Documents/codes/eos/include/eos/fitting/RenderingParameters.hpp:137:25: note: deduced return type only available with -std=c++1y or -std=gnu++1y In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:34:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp: In function ‘std::vector<int> eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)’: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:81: warning: use of ‘auto’ in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y std::for_each(begin(mesh.vertices), end(mesh.vertices), [&rotated_vertices, &R](auto&& v) { rotated_vertices.push_back(R * v); }); ^ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: At global scope: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:145:158: error: ‘get_corresponding_pointset’ function uses ‘auto’ type specifier without trailing return type inline auto get_corresponding_pointset(const T& landmarks, const core::LandmarkMapper& landmark_mapper, const morphablemodel::MorphableModel& morphable_model) ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:145:158: note: deduced return type only available with -std=c++1y or -std=gnu++1y /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:183:76: error: ‘concat’ function uses ‘auto’ type specifier without trailing return type inline auto concat(const std::vector<T>& vec_a, const std::vector<T>& vec_b) ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:183:76: note: deduced return type only available with -std=c++1y or -std=gnu++1y In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: In function ‘std::pair<eos::render::Mesh, eos::fitting::RenderingParameters> eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:319:74: error: invalid use of ‘auto’ vertex_indices = fitting::concat(vertex_indices, vertex_indices_contour); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:320:68: error: invalid use of ‘auto’ image_points = fitting::concat(image_points, image_points_contour); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:100: warning: use of ‘auto’ in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:100: warning: use of ‘auto’ in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:334:74: error: invalid use of ‘auto’ image_points = fitting::concat(image_points, edge_correspondences.first); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:335:79: error: invalid use of ‘auto’ vertex_indices = fitting::concat(vertex_indices, edge_correspondences.second); ^ In file included from /usr/include/c++/4.9/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.9/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const glm::tvec4<float, (glm::precision)0u>*, std::vector<glm::tvec4<float, (glm::precision)0u> > >; _Funct = eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)::<lambda(auto:2&&)>]’: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:130: required from here /usr/include/c++/4.9/bits/stl_algo.h:3756:14: error: invalid use of ‘auto’ __f(*__first); ^ /usr/include/c++/4.9/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Funct = eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::<lambda(auto:3&&)>]’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:196: required from here /usr/include/c++/4.9/bits/stl_algo.h:3756:14: error: invalid use of ‘auto’ /usr/include/c++/4.9/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Funct = eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::<lambda(auto:4&&)>]’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:196: required from here /usr/include/c++/4.9/bits/stl_algo.h:3756:14: error: invalid use of ‘auto’ In file included from /usr/include/c++/4.9/bits/stl_algobase.h:71:0, from /usr/include/c++/4.9/bits/char_traits.h:39, from /usr/include/c++/4.9/string:40, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:25, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::<lambda(auto:1&&)>]’: /usr/include/c++/4.9/bits/stl_algo.h:120:22: required from ‘_RandomAccessIterator std::__find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = __gnu_cxx::__ops::_Iter_pred<eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::<lambda(auto:1&&)> >]’ /usr/include/c++/4.9/bits/stl_algo.h:162:43: required from ‘_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = __gnu_cxx::__ops::_Iter_pred<eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::<lambda(auto:1&&)> >]’ /usr/include/c++/4.9/bits/stl_algo.h:3805:45: required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::<lambda(auto:1&&)>]’ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:116: required from here /usr/include/c++/4.9/bits/predefined_ops.h:231:30: error: invalid use of ‘auto’ { return bool(_M_pred(*__it)); } ^ make[2]: *** [examples/CMakeFiles/fit-model.dir/fit-model.cpp.o] Error 1 make[1]: *** [examples/CMakeFiles/fit-model.dir/all] Error 2 make: *** [all] Error 2
The devel branch is build on travis with gcc-4.9, see here: https://travis-ci.org/patrikhuber/eos/branches And in that respect nothing changed from master to devel, so master should build on gcc-4.9 too.
Can you please make sure you're really using gcc-4.9 to compile and it's not using gcc-4.8, which is probably your default compiler? You probably are though - the error is slightly different. It actually says what you need to do: Add -std=c++1y
. This should solve it.
You saved me a lot of time. Thank you so much.
I used gcc-4.9, and changed line 19 to:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
in CMakeLists.txt
sudo update-alternatives --config gcc There are 3 choices for the alternative gcc (providing /usr/bin/gcc).
0 /usr/bin/gcc-4.8 60 auto mode
Press enter to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/bin/gcc-4.9 to provide /usr/bin/gcc (gcc) in manual mode
[ 33%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o Linking CXX executable fit-model [ 33%] Built target fit-model Scanning dependencies of target fit-model-simple [ 66%] Building CXX object examples/CMakeFiles/fit-model-simple.dir/fit-model-simple.cpp.o Linking CXX executable fit-model-simple [ 66%] Built target fit-model-simple Scanning dependencies of target generate-obj [100%] Building CXX object examples/CMakeFiles/generate-obj.dir/generate-obj.cpp.o Linking CXX executable generate-obj [100%] Built target generate-obj
Great!
This will be improved with the next release btw - in the devel branch, there is already code that will add this flag automatically for compilers that require it.
Just as an aside, if you got gcc-5 installed anyway, I'd recommend using it - it produces better code and fixes a lot of bugs. And at some point eos will probably also require gcc-5.
Hi,
Thank you for the great library and making it available. I am trying to compile it, however I am running into issues here:
My compiler is: gcc version 4.8.5 (Ubuntu 4.8.5-2ubuntu1~14.04.1)
Below is the output. Please kindly help. Thank you
[ 33%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:21:0: /home/sj/Documents/codes/eos/include/eos/core/LandmarkMapper.hpp:128:14: warning: ‘size’ function uses ‘auto’ type specifier without trailing return type [enabled by default] auto size() const ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp: In function ‘std::tuple<std::vector<cv::Vec<float, 2>, std::allocator<cv::Vec<float, 2> > >, std::vector<cv::Vec<float, 4>, std::allocator<cv::Vec<float, 4> > >, std::vector<int, std::allocator<int> > > eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)’: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:83: error: parameter declared ‘auto’ auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp: In lambda function: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:95: error: ‘e’ was not declared in this scope auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:95: note: suggested alternative: In file included from /home/sj/Documents/codes/eos/3rdparty/glm/glm/gtc/../gtc/constants.hpp:176:0, from /home/sj/Documents/codes/eos/3rdparty/glm/glm/gtc/matrix_transform.hpp:28, from /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:30, from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/3rdparty/glm/glm/gtc/../gtc/constants.inl:117:43: note: ‘glm::e’ GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType e() ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:26:0, from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:34, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/RenderingParameters.hpp: At global scope: /home/sj/Documents/codes/eos/include/eos/fitting/RenderingParameters.hpp:137:25: warning: ‘get_camera_type’ function uses ‘auto’ type specifier without trailing return type [enabled by default] auto get_camera_type() const { ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:34:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp: In function ‘std::vector<int> eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)’: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:89: error: parameter declared ‘auto’ std::for_each(begin(mesh.vertices), end(mesh.vertices), [&rotated_vertices, &R](auto&& v) { rotated_vertices.push_back(R * v); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp: In lambda function: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:125: error: ‘v’ was not declared in this scope std::for_each(begin(mesh.vertices), end(mesh.vertices), [&rotated_vertices, &R](auto&& v) { rotated_vertices.push_back(R * v); }); ^ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: At global scope: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:145:158: warning: ‘get_corresponding_pointset’ function uses ‘auto’ type specifier without trailing return type [enabled by default] inline auto get_corresponding_pointset(const T& landmarks, const core::LandmarkMapper& landmark_mapper, const morphablemodel::MorphableModel& morphable_model) ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:183:76: warning: ‘concat’ function uses ‘auto’ type specifier without trailing return type [enabled by default] inline auto concat(const std::vector<T>& vec_a, const std::vector<T>& vec_b) ^ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: In function ‘std::pair<eos::render::Mesh, eos::fitting::RenderingParameters> eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:108: error: parameter declared ‘auto’ std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: In lambda function: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:154: error: ‘lm’ was not declared in this scope std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:192: error: no matching function for call to ‘std::vector<Eigen::Matrix<float, 2, 1> >::push_back(<brace-enclosed initializer list>)’ std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:192: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:26, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Eigen::Matrix<float, 2, 1>; _Alloc = std::allocator<Eigen::Matrix<float, 2, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<float, 2, 1>] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type& {aka const Eigen::Matrix<float, 2, 1>&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Eigen::Matrix<float, 2, 1>; _Alloc = std::allocator<Eigen::Matrix<float, 2, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<float, 2, 1>] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<Eigen::Matrix<float, 2, 1> >::value_type&& {aka Eigen::Matrix<float, 2, 1>&&}’ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: In function ‘std::pair<eos::render::Mesh, eos::fitting::RenderingParameters> eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:108: error: parameter declared ‘auto’ std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp: In lambda function: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:154: error: ‘lm’ was not declared in this scope std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:192: error: no matching function for call to ‘std::vector<Eigen::Matrix<float, 2, 1> >::push_back(<brace-enclosed initializer list>)’ std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:192: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:26, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Eigen::Matrix<float, 2, 1>; _Alloc = std::allocator<Eigen::Matrix<float, 2, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<float, 2, 1>] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type& {aka const Eigen::Matrix<float, 2, 1>&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Eigen::Matrix<float, 2, 1>; _Alloc = std::allocator<Eigen::Matrix<float, 2, 1> >; std::vector<_Tp, _Alloc>::value_type = Eigen::Matrix<float, 2, 1>] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<Eigen::Matrix<float, 2, 1> >::value_type&& {aka Eigen::Matrix<float, 2, 1>&&}’ In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const glm::tvec4<float, (glm::precision)0u>*, std::vector<glm::tvec4<float, (glm::precision)0u> > >; _Funct = eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)::__lambda2]’: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:130: required from here /usr/include/c++/4.8/bits/stl_algo.h:4417:14: error: no match for call to ‘(eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)::__lambda2) (const glm::tvec4<float, (glm::precision)0u>&)’ __f(*__first); ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:34:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:80: note: candidate is: std::for_each(begin(mesh.vertices), end(mesh.vertices), [&rotated_vertices, &R](auto&& v) { rotated_vertices.push_back(R * v); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:90: note: eos::fitting::occluding_boundary_vertices(const eos::render::Mesh&, const eos::morphablemodel::EdgeTopology&, glm::mat4x4)::__lambda2 std::for_each(begin(mesh.vertices), end(mesh.vertices), [&rotated_vertices, &R](auto&& v) { rotated_vertices.push_back(R * v); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/closest_edge_fitting.hpp:129:90: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Funct = eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda3]’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:196: required from here /usr/include/c++/4.8/bits/stl_algo.h:4417:14: error: no match for call to ‘(eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda3) (eos::core::Landmark<cv::Vec<float, 2> >&)’ __f(*__first); ^ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:99: note: candidate is: std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:110: note: eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda3 std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:327:110: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Funct = eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda4]’: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:196: required from here /usr/include/c++/4.8/bits/stl_algo.h:4417:14: error: no match for call to ‘(eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda4) (eos::core::Landmark<cv::Vec<float, 2> >&)’ __f(*__first); ^ In file included from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24:0: /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:99: note: candidate is: std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:110: note: eos::fitting::fit_shape_and_pose(const eos::morphablemodel::MorphableModel&, const std::vector<eos::morphablemodel::Blendshape>&, eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const eos::core::LandmarkMapper&, int, int, const eos::morphablemodel::EdgeTopology&, const eos::fitting::ContourLandmarks&, const eos::fitting::ModelContour&, int, boost::optional<int>, float, boost::optional<eos::fitting::RenderingParameters>, std::vector<float>&, std::vector<float>&, std::vector<cv::Vec<float, 2> >&)::__lambda4 std::for_each(begin(contour_landmarks_), end(contour_landmarks_), [&occluding_contour_landmarks](auto&& lm) { occluding_contour_landmarks.push_back({ lm.coordinates[0], lm.coordinates[1] }); }); ^ /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:331:110: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1]’: /usr/include/c++/4.8/bits/stl_algo.h:4465:41: required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const eos::core::Landmark<cv::Vec<float, 2> >*, std::vector<eos::core::Landmark<cv::Vec<float, 2> >, std::allocator<eos::core::Landmark<cv::Vec<float, 2> > > > >; _Predicate = eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1]’ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:116: required from here /usr/include/c++/4.8/bits/stl_algo.h:214:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:218:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:222:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:226:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:234:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:238:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided In file included from /usr/include/c++/4.8/algorithm:62:0, from /home/sj/Documents/codes/eos/include/eos/core/Landmark.hpp:27, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:20: /usr/include/c++/4.8/bits/stl_algo.h:242:23: error: no match for call to ‘(eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1) (const eos::core::Landmark<cv::Vec<float, 2> >&)’ if (__pred(*__first)) ^ In file included from /home/sj/Documents/codes/eos/include/eos/fitting/fitting.hpp:33:0, from /home/sj/Documents/codes/eos/examples/fit-model.cpp:24: /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:74: note: candidate is: auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: eos::fitting::get_nearest_contour_correspondences(eos::core::LandmarkCollection<cv::Vec<float, 2> >&, const std::vector<std::basic_string<char> >&, const std::vector<int>&, const eos::render::Mesh&, const mat4x4&, const mat4x4&, const vec4&)::__lambda1 auto result = std::find_if(begin(landmarks), end(landmarks), [&ibug_idx](auto&& e) { return e.name == ibug_idx; }); // => this can go outside the loop ^ /home/sj/Documents/codes/eos/include/eos/fitting/contour_correspondence.hpp:290:84: note: candidate expects 0 arguments, 1 provided make[2]: *** [examples/CMakeFiles/fit-model.dir/fit-model.cpp.o] Error 1 make[1]: *** [examples/CMakeFiles/fit-model.dir/all] Error 2 make: *** [all] Error 2