Skip to content

rahulsrma26/shol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shol

Simple header only library for C++. Containing various useful functions. Things like, python type print support for containers using cout:

map<string, int> dict = {{"one", 1}, {"two", 2}};
cout << dict << endl;
// this will print {(one, 1), (two, 2)}
// it'll work on any nested combination of containers.

for more see std_cout.

I've tried to make it as cross platform as possible. But there is no guarantee. Examples are tested for Windows, MacOX and Linux.


Install

Just copy the headers.

  • Copy the include folder to your build tree and use a C++14 compiler.

Running examples

Examples can be build using cmake.

  • Linux and MacOS (make)

    mkdir build
    cd build
    cmake ..
    make
  • Windows

    Visual Studio 2017 and later can directly open a CMake project. However, if you want to build using Developer Command prompt instead then run:

    mkdir build
    cd build
    cmake ..
    msbuild examples.sln /t:Build /p:Configuration=Release

More ways to build

Examples can also be build using ninja across any platform.

  • Using ninja

    mkdir build
    cd build
    cmake .. -GNinja
    ninja -v
  • If you want to use mingw (GCC) instead of MSVC under windows then chocolatey can be used to install dependencies for ninja build.

    choco intall -y mingw ninja cmake

    After that append cmake install path ("C:\Program Files\CMake\bin") to Environment Variable.

Releases

No releases published

Packages

No packages published