From bcb2815ab394486b1d735eb228fb1dbdf407436b Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Sun, 11 Aug 2019 17:03:05 -0700 Subject: [PATCH] stb_ds: add documentation for STBDS_UNIT_TESTS, -std=c++0x --- stb_ds.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stb_ds.h b/stb_ds.h index b5af50f..7aa59a6 100644 --- a/stb_ds.h +++ b/stb_ds.h @@ -1,4 +1,4 @@ -/* stb_ds.h - v0.61 - public domain data structures - Sean Barrett 2019 +/* stb_ds.h - v0.62 - public domain data structures - Sean Barrett 2019 This is a single-header-file library that provides easy-to-use dynamic arrays and hash tables for C (also works in C++). @@ -51,6 +51,14 @@ COMPILE-TIME OPTIONS define both, or neither. Note that at the moment, 'context' will always be NULL. @TODO add an array/hash initialization function that takes a memory context pointer. + #define STBDS_UNIT_TESTS + + Defines a function stbds_unit_tests() that checks the functioning of the data structures. + + Note that on older versions of gcc (e.g. 5.x.x) you may need to build with '-std=c++0x' + (or equivalentally '-std=c++11') when using anonymous structures as seen on the web + page or in STBDS_UNIT_TESTS. + LICENSE Placed in the public domain and also MIT licensed.