Skip to content

C++ library to simplify and accelerate development in C++

Notifications You must be signed in to change notification settings

shibasis0801/overlord-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overlord C++ library

These are a set of header files and implementations being designed by me to simplify and accelerate C++ development.

Example Usage

Range (Inspired from python)

range(start, stop, stride)

A range is a datatype you can use in range for loops. It is made with only primitive data and some simple functions stiched together. As a result it is very fast.

Basic

for (int i : range(0, 10))
    cout << i << ", ";

will print

0, 1, 2, 3, 4, 5, 6, 7, 8, 9,

Python equivalent

    for i in range(0, 10):
        print(f"{i}, ", end='')

With custom step

for (int i : range(0, 10).step(2))
    cout << i << ", ";

will print

0, 2, 4, 6, 8

Python equivalent

for i in range(0, 10, 2):
    print(f"{i}, ", end='')

Or

for i in range(0, 10)[::2]:
    print(f"{i}, ", end='')

Reverse

for (int i : range(10, 0).step(-1))
    cout << i << ", ";

Python equivalent

for i in range(10, 0, -1)
    print(f"{i}, ", end='')

Lots more documentation to come.

About

C++ library to simplify and accelerate development in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published