Skip to content

Latest commit

 

History

History
89 lines (73 loc) · 2.91 KB

README.md

File metadata and controls

89 lines (73 loc) · 2.91 KB

Language Standard License

AnySet

AnySet is a type-erased hash set in the style of std::unordered_set written in C++17.

In short, you can do neat stuff like this:

using namespace std::literals;
te::AnySet<> set({"Add"s, "a"s, "few"s, "strings"s});
// Or add some ints
set.insert({1, 2, 3, 4});
// Or just whatever
set.insert("Hello"s, 1, 3.1415, std::bitset<3>{0b011u});
// .contains() ... 
assert(set.contains("Hello"s));
// With the appropriate includes, you can even print it!
std::cout << set << std::endl;
// prints: {1, 3.1415, Add, 3, a, few, 011, 4, strings, 2, Hello}

Contents

Quick Links

See the tutorial page for in-depth usage examples and discussions of AnySet's features.

See the comprehensive documentation for the details AnySet's usage.

Installation

AnySet can be installed via the standard git-clone -> CMake -> make -> install procedure:

$ git clone https://github.com/tvanslyke/AnySet.git
$ cd AnySet
$ cmake [options] ./
$ make
$ make install

Requirements

Installing AnySet requires only CMake and git. Using AnySet in a C++ project requires a C++17-compliant compiler (see Supported Compilers and Standard Libraries).

Running the Tests

The tests can be built from the top-level project directory as follows:

$ cmake ./
$ make test-anyset

To run the tests do:

$ ./test/test-anyset

Building the Docs

For the latest version of the documentation, see the Documentation section.

AnySet uses Doxygen for its documentation. The docs can be built from the top-level project directory as follows:

$ cmake ./
$ make docs

To view the docs, open the doc/html/index.html in your favorite web browser, do:

$ <my-favorite-browser> doc/html/index.html

Supported Compilers and Standard Libraries

The test suite compiles and passes with the following compilers:

  • clang++-5.0 with libstdc++-8 and libc++-7
  • clang++-6.0 with libstdc++-8 and libc++-7
  • g++-7.3 with libstdc++-7
  • g++-8.1 with libstdc++-8

Other versions or combinations of any of the above compilers and STL implementations may work as well, but have not been tested.

Contributing

Pull requests and bug reports are welcome!

Authors

License

This project is licensed under the MIT License.