From e039ddf2fe920e3a693d086db124943ffae5994b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Sun, 12 Oct 2014 15:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86std::string=E6=9B=BF=E6=8D=A2=E6=88=90?= =?UTF-8?q?TinySTL::string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TinySTL/Bitmap.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TinySTL/Bitmap.h b/TinySTL/Bitmap.h index fd1efaf..d3a6299 100644 --- a/TinySTL/Bitmap.h +++ b/TinySTL/Bitmap.h @@ -4,9 +4,10 @@ #include #include #include -#include +//#include #include "Allocator.h" +#include "String.h" #include "UninitializedFunctions.h" namespace TinySTL{ @@ -60,7 +61,8 @@ namespace TinySTL{ bitmap& flip(); bitmap& flip(size_t pos); - std::string to_string() const; + //std::string to_string() const; + string to_string() const; template friend std::ostream& operator <<(std::ostream& os, const bitmap& bm); @@ -177,8 +179,8 @@ namespace TinySTL{ return !any(); } template - std::string bitmap::to_string() const{ - std::string str; + string bitmap::to_string() const{ + string str; uint8_t *ptr = start_; for (; ptr != finish_; ++ptr){ uint8_t n = *ptr;