summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-11 17:00:19 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-11 17:00:19 +0000
commite8941294bae84a6185860425177ba8237068dcf4 (patch)
tree6dd27dc345d82fdf00b250202e7fcf65490977cf /src/Simplex_tree
parent6f73317041162da6dcc8bc5f52ca62a560b12ec4 (diff)
Allow st.find({1,2,3}) on good compilers. That includes VS 2015 but not 2013, however I believe it will just ignore the change so it should not hurt. (I'll revert otherwise)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@904 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8f29072c7f5bfa24de5033ada6b377deaf0c8689
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 4c6a95e8..ea61fa2e 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -39,6 +39,7 @@
#include <utility>
#include <vector>
#include <functional> // for greater<>
+#include <initializer_list>
namespace Gudhi {
@@ -531,7 +532,7 @@ class Simplex_tree {
* The type InputVertexRange must be a range of <CODE>Vertex_handle</CODE>
* on which we can call std::begin() function
*/
- template<class InputVertexRange>
+ template<class InputVertexRange=std::initializer_list<Vertex_handle>>
Simplex_handle find(const InputVertexRange & s) {
auto first = std::begin(s);
auto last = std::end(s);
@@ -625,7 +626,7 @@ class Simplex_tree {
*
* The type InputVertexRange must be a range for which .begin() and
* .end() return input iterators, with 'value_type' Vertex_handle. */
- template<class InputVertexRange>
+ template<class InputVertexRange=std::initializer_list<Vertex_handle>>
std::pair<Simplex_handle, bool> insert_simplex(const InputVertexRange & simplex,
Filtration_value filtration = 0) {
auto first = std::begin(simplex);
@@ -654,7 +655,7 @@ class Simplex_tree {
* output pair to the Simplex_handle of the simplex. Otherwise, we set the Simplex_handle part to
* null_simplex.
*/
- template<class InputVertexRange>
+ template<class InputVertexRange=std::initializer_list<Vertex_handle>>
std::pair<Simplex_handle, bool> insert_simplex_and_subfaces(const InputVertexRange& Nsimplex,
Filtration_value filtration = 0) {
auto first = std::begin(Nsimplex);