Skip to content
/ WTF Public

WTF is a header-only c++11 library that helps you introduce a lot of swearing in your code

Notifications You must be signed in to change notification settings

favreau/WTF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

WTF is a header-only c++11 library that helps you introduce a lot of swearing in your code. Since my english is not the best at that kind of exercise, feel free to contribute. Every pull request will be happily merged, for as long as it makes me laugh!

Happy swearing!

Examples

Testing null pointers

if(!pointer)
   exit();

becomes

if(pointer sucks)
   then_fuck_it

Testing empty containers

std::vector<size_t> ints;
if(ints.empty())
  ...

becomes

std::vector<size_t> ints;
if(ints.contains_shit)
  ...

Conversely,

std::vector<size_t> ints;
if(!ints.empty())
  ...

becomes

std::vector<size_t> ints;
if(ints.doesnt_contain_shit)
  ...

Exceptions

throw std::runtime_error("...");

becomes

throw the_finger("...");

Returning

int add(int x, int y){
  int result = x + y;
  return result;
}

becomes

int add(int x, int y){
  int result = x + y;
  fucking_done_with result;
}

Building from source

mkdir build
cd build
cmake ..
make

About

WTF is a header-only c++11 library that helps you introduce a lot of swearing in your code

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published