From cdb39c39a60fe06009168c1ecb1d4ce5de0bed8c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Jun 2017 09:31:43 +0000 Subject: Fix auto lambda (requires C++14) compilation issue git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/read_persistence_from_file@2550 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: df64cfdde77500b06f00432a1d1532518cd4dd37 --- src/common/include/gudhi/reader_utils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/include') diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h index 8df20dcc..f1684d78 100644 --- a/src/common/include/gudhi/reader_utils.h +++ b/src/common/include/gudhi/reader_utils.h @@ -25,8 +25,8 @@ #include #include -#include +#include #include #include @@ -340,12 +340,12 @@ The return value is an `std::map>>` where `dim` is an `int`, `birth` a `double`, and `death` a `double`. Note: the function does not check that birth <= death. **/ -std::map>> read_persistence_intervals_grouped_by_dimension(std::string const& filename) { +inline std::map>> read_persistence_intervals_grouped_by_dimension(std::string const& filename) { std::map>> ret; read_persistence_intervals_and_dimension( filename, - boost::make_function_output_iterator([&ret](auto t) { ret[get<0>(t)].push_back(std::make_pair(get<1>(t), get<2>(t))); })); + boost::make_function_output_iterator([&ret](std::tuple t) { ret[get<0>(t)].push_back(std::make_pair(get<1>(t), get<2>(t))); })); return ret; } // read_persistence_diagram_from_file @@ -360,12 +360,12 @@ The return value is an `std::vector>` where `dim` is an `int`, `birth` a `double`, and `death` a `double`. Note: the function does not check that birth <= death. **/ -std::vector> read_persistence_intervals_in_dimension(std::string const& filename, int only_this_dim = -1) { +inline std::vector> read_persistence_intervals_in_dimension(std::string const& filename, int only_this_dim = -1) { std::vector> ret; read_persistence_intervals_and_dimension( filename, - boost::make_function_output_iterator([&ret](auto t) { ret.emplace_back(get<1>(t), get<2>(t)); })); + boost::make_function_output_iterator([&ret](std::tuple t) { ret.emplace_back(get<1>(t), get<2>(t)); })); return ret; } // read_persistence_diagram_from_file -- cgit v1.2.3