geojson parser : add phoenix v2 not_empty implementation

This commit is contained in:
artemp 2013-11-21 10:06:12 +00:00
parent 2b8b71fc98
commit 9d7d024cf4

View File

@ -177,6 +177,27 @@ struct multi_geometry_type
return std::tuple<unsigned,bool>(type, collection);
}
};
struct not_empty
{
template <typename T>
struct result { typedef bool type; };
bool operator() (geometry_container const& cont) const
{
geometry_container::const_iterator itr = cont.begin();
geometry_container::const_iterator end = cont.end();
for (; itr!=end; ++itr)
{
if (itr->size() > 0) return true;
}
return false;
}
};
#endif