From 8c917cf38bd95901d3f8103d379a4215536ca2d7 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Thu, 14 Jul 2016 15:10:58 +0100 Subject: [PATCH] Drop the only dependency I had on boost. --- include/duckhandy/lexical_cast.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/duckhandy/lexical_cast.hpp b/include/duckhandy/lexical_cast.hpp index 33ee80e..251e52c 100644 --- a/include/duckhandy/lexical_cast.hpp +++ b/include/duckhandy/lexical_cast.hpp @@ -32,8 +32,8 @@ #include #include #include -#include #include +#include namespace dhandy { namespace customize { @@ -96,7 +96,8 @@ namespace dhandy { inline T string_to_int (const F& parFrom) { T retval(0); T mul(1); - for (auto chara : boost::adaptors::reverse(parFrom)) { + for (auto it = std::rbegin(parFrom), itEND = std::rend(parFrom); it != itEND; ++it) { + const auto chara = *it; retval += dhandy::customize::char_to_int::make(chara) * mul; mul *= Tag::base; }