Use sstream instead of lexical_cast

This commit is contained in:
Andreas Fabri 2017-12-20 15:03:21 +00:00
parent 9bd7ffb424
commit 3fe2e280aa
1 changed files with 5 additions and 4 deletions

View File

@ -31,6 +31,7 @@
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include <iostream> #include <iostream>
#include <sstream>
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>
#include <string> #include <string>
@ -41,7 +42,6 @@
#include <boost/array.hpp> #include <boost/array.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <CGAL/property_map.h> #include <CGAL/property_map.h>
#include <CGAL/Iterator_range.h> #include <CGAL/Iterator_range.h>
#include <CGAL/circulator.h> #include <CGAL/circulator.h>
@ -1816,10 +1816,11 @@ private: //--------------------------------------------------- property handling
template<class I, class T> template<class I, class T>
std::pair<Property_map<I, T>, bool> std::pair<Property_map<I, T>, bool>
add_property_map(const std::string& name=std::string(), const T t=T()) { add_property_map(std::string name=std::string(), const T t=T()) {
if(name.empty()){ if(name.empty()){
std::string name("anonymous-property-"); std::ostringstream oss;
name += boost::lexical_cast<std::string>(anonymous_property_++); oss << "anonymous-property-" << anonymous_property_++;
name = std::string(oss.str());
} }
return Property_selector<I>(this)().template add<T>(name, t); return Property_selector<I>(this)().template add<T>(name, t);
} }