将std::string替换成TinySTL::string
This commit is contained in:
@@ -4,9 +4,10 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
//#include <string>
|
||||||
|
|
||||||
#include "Allocator.h"
|
#include "Allocator.h"
|
||||||
|
#include "String.h"
|
||||||
#include "UninitializedFunctions.h"
|
#include "UninitializedFunctions.h"
|
||||||
|
|
||||||
namespace TinySTL{
|
namespace TinySTL{
|
||||||
@@ -60,7 +61,8 @@ namespace TinySTL{
|
|||||||
bitmap& flip();
|
bitmap& flip();
|
||||||
bitmap& flip(size_t pos);
|
bitmap& flip(size_t pos);
|
||||||
|
|
||||||
std::string to_string() const;
|
//std::string to_string() const;
|
||||||
|
string to_string() const;
|
||||||
|
|
||||||
template<size_t N>
|
template<size_t N>
|
||||||
friend std::ostream& operator <<(std::ostream& os, const bitmap<N>& bm);
|
friend std::ostream& operator <<(std::ostream& os, const bitmap<N>& bm);
|
||||||
@@ -177,8 +179,8 @@ namespace TinySTL{
|
|||||||
return !any();
|
return !any();
|
||||||
}
|
}
|
||||||
template<size_t N>
|
template<size_t N>
|
||||||
std::string bitmap<N>::to_string() const{
|
string bitmap<N>::to_string() const{
|
||||||
std::string str;
|
string str;
|
||||||
uint8_t *ptr = start_;
|
uint8_t *ptr = start_;
|
||||||
for (; ptr != finish_; ++ptr){
|
for (; ptr != finish_; ++ptr){
|
||||||
uint8_t n = *ptr;
|
uint8_t n = *ptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user