diff --git a/drawing.cpp b/drawing.cpp index 3d565eb3..796b5e54 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -919,7 +919,8 @@ void draw_s2xe(dqi_poly *p, dqi_poly *npoly) { vector pd; for(int i=0; icnt; i++) { hyperpoint h = p->V * glhr::gltopoint( (*p->tab)[p->offset+i]); - auto& next = pd.emplace_back(); + pd.emplace_back(); + auto& next = pd.back(); auto dp = product_decompose(h); next.direction = dp.second; next.z = dp.first; diff --git a/nonisotropic.cpp b/nonisotropic.cpp index bec722d7..220c08ad 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -566,7 +566,7 @@ EX namespace product { hrmap *pmap; geometry_information *pcgip; - template auto in_actual(const T& t) { + template auto in_actual(const T& t) -> decltype(t()) { dynamicval g(geometry, gProduct); dynamicval gc(cgip, pcgip); dynamicval gu(currentmap, pmap); @@ -583,7 +583,7 @@ EX namespace product { heptagon *getOrigin() override { return underlying_map->getOrigin(); } - template auto in_underlying(const T& t) { + template auto in_underlying(const T& t) -> decltype(t()) { pcgip = cgip; dynamicval gpm(pmap, this); dynamicval g(geometry, underlying); @@ -593,7 +593,7 @@ EX namespace product { } cell *getCell(cell *u, int h) { - cell*& c = at[{u, h}]; + cell*& c = at[make_pair(u, h)]; if(!c) { c = newCell(u->type+2, u->master); where[c] = {u, h}; } return c; } @@ -724,7 +724,7 @@ EX namespace product { } #if HDR - template auto in_underlying_geometry(const T& f) { + template auto in_underlying_geometry(const T& f) -> decltype(f()) { if(!prod) return f(); dynamicval g(geometry, underlying); dynamicval gc(cgip, underlying_cgip);