From 0e661409b1837beedf62cdf05f18e1453cb880ae Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 7 Nov 2023 16:52:42 +1100 Subject: Fix missing licenses Includes removing unused shared_string This helps with #6, but there's still more work to do --- lib/shared_string/README.md | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 lib/shared_string/README.md (limited to 'lib/shared_string/README.md') diff --git a/lib/shared_string/README.md b/lib/shared_string/README.md deleted file mode 100755 index daa7ce45..00000000 --- a/lib/shared_string/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# shared_string - -Simple implementation of a shared string in C++ (C++11). - -All it does is wrap up a std::shared_ptr> and give it std::basic_string interface, so it's feels like you're using a regular ol' std::string. Almost all of the implemented methods are thin wrappers around the actual shared string. - -### Methods missing that exist in std::basic_string - -- reserve() -- capacity() -- shrink_to_fit() -- append() -- assign() -- insert() -- erase() -- replace() -- push_front() -- push_back() -- all methods that return a non-const iterator - -It's not meant for manipulating the string underneath. If you need those methods, you should just use std::string. - -Note that you still get operator=() and clear(). - -### Couldn’t I just use const std::string&? - -Sure. But it doesn’t help you if, for instance, you want to use those strings as keys in maps. shared_string allows you to create lots of std::map’s and not incur a penalty for repeating the keys over and over again. - -### Couldn’t I use boost::const_string? - -You bet! And you should. But this has different semantics - if you initialize a shared_string with a const char *, a copy is made, and the shared_string takes ownership of that copy - just like std::string. Just like std::string except that copying a shared_string doesn’t allocate new buffers. -- cgit v1.2.3