dermojo / spsl Goto Github PK
View Code? Open in Web Editor NEWSpecial Purpose Strings Library
License: MIT License
Special Purpose Strings Library
License: MIT License
Time to update to a newer standard...
That would allow more constexpr and a lot of cleanup, including removing the custom hash implementation. Also, string functions can be delegated to std::string_view.
StringCore and StringBase can be merged, there's no real benefit in the "reduced" string API set.
On Linux, it's possible to exclude pages from core dumps by using madvice. Unfortunately, this requires that we work with full pages.
But since we need to use pages for #2 already, this is a viable option that should at least be offered, if it's not on by default.
Integrate useful stuff from ci_helloworld
Use googletest as submodule instead of relying on an external installation.
Travis CI integration would be great!
Using boost::replace() fails with Clang, because there's a implicit conversion from const_iterator to iterator, which is wrong.
Need to check all usage of const_iterator...
The currently used clang-tidy and clang-format are at v6.0, which becomes more and more outdated.
Check if there's a more recent version available (also on Travis CI).
The MurmurHash3 implementation casts the string array to a uint64_t*, which may break the alignment.
This needs investigation: What happens if the array is unaligned? How can this be fixed?
Instead of using a Boolean template parameter, using a policy class leads to a better design.
Currently untested and not supported.
It shall be possible to construct and query ArrayString[W] instances at compile time.
This means, the following methods shall be constexpr:
Example:
constexpr spsl::ArrayStringBase<char, 64> a1("I'm a stack-based string and can store 64 characters + NUL");
static_assert(a1.length() == 58, "oops...");
Allow to build without a copy of gsl-lite (e.g. for fully dependency-free offline builds), using some CMake magic.
It would be great to have an interface (pure virtual class) with std::basic_string like methods that hides the underlying string implementation + a template implementation.
When using truncation in ArrayStorage, this can break multi-byte UTF-8 sequences.
First of all, there needs to be clear documentation about this problem, and second, this should be fixed (if possible).
StoragePassword uses VirtualLock/VirtualUnlock on Windows to avoid swapping to disk. This doesn't work properly if multiple instance of the string are instantiated, because Windows doesn't keep a lock count - the first call to VirtualUnlock will enable swapping for the page again.
(need to check on munlock on Linux...)
One solution is to allocate full pages, so there are no conflicts.
We currently have no implementation for ">>" and "<<".
Currently, static_cast<gsl::byte>(0)
isn't possible. This prevents storing bytes in any of our string classes.
It's debatable whether this makes sense, because bytes aren't strings, but reusing spsl::PasswordString as a "safe byte storage" container would be beneficial.
Currently, only Visual Studio is supported on Windows. Mingw should work as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.