diff --git a/pytriqs/gf/local/gf_desc.py b/pytriqs/gf/local/gf_desc.py index 05308847..bd470597 100644 --- a/pytriqs/gf/local/gf_desc.py +++ b/pytriqs/gf/local/gf_desc.py @@ -202,8 +202,7 @@ def make_gf( py_type, c_tag, is_complex_data = True, is_im = False) : arithmetic = ("algebra",data_type) ) - g.add_constructor(signature = "(gf_mesh<%s> mesh, mini_vector shape, std::vector> indices = {}, std::string name = "")"%c_tag, - python_precall = "pytriqs.gf.local._gf_%s.init"%c_tag) + g.add_constructor(signature = "(gf_mesh<%s> mesh, mini_vector shape, std::vector> indices = std::vector>{}, std::string name = "")"%c_tag, python_precall = "pytriqs.gf.local._gf_%s.init"%c_tag) g.add_method_copy() g.add_method_copy_from() diff --git a/triqs/gfs/tools.hpp b/triqs/gfs/tools.hpp index 9a0276b9..cb583954 100644 --- a/triqs/gfs/tools.hpp +++ b/triqs/gfs/tools.hpp @@ -94,7 +94,7 @@ namespace gfs { std::vector operator[](int i) const { if (is_empty()) - return {}; + return std::vector {}; else return ind[i]; }