Skip to content

MaxXSoft/XSTL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XSTL

Write some lightweight gadgets to eXtend STL ...

Gadgets

  • progress.h: display progress bar in terminal
  • singleton.h: a base template class of singleton (thread-safe)
  • os.h: macros about platform/compiler
  • cast.h: casting between different pointer types or endians
  • argparse.h: command line argument parser
  • style.h: set output style of std::ostream
  • guard.h: do something when leaving current block (used to generate type info and IR in TinyLang, combining with visitor pattern)
  • nested.h: nested map, supported recursive lookup
  • bitvalue.h: bit extraction/concatenation, can be used in both runtime and compile time
  • bitpat.h: bitwise pattern match
  • embed.h: embedding text file into C++ as a null-terminated char array

Deprecated Gadgets

We do not recommend you to use the following gadgets in your project since they are too shabby:

  • raii.h: using RAII to release resources automatically
  • str_hash.h: get the hash value of a string constant while compile time
  • argh.h: parse command line arguments
  • gc/gc.h: using reference counting and mark-and-sweep garbage collecting techniques to release resources, you can use it just like using std::shared_ptr!
  • range.h: can be used in a range-based for loop, like 'range()' in Python

Examples

See examples directory.

Requirement

C++17 required.

Copyright and License

Copyright (C) 2010-2020 MaxXSoft. License MIT.

About

write some gadgets to eXtend STL ...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published