Real-world units as literal suffixes for C++11
C C++
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Makefile
README.mkd
sipp.h
test.cpp

README.mkd

sipp

SI++ is a header file for C++ that defines a few custom suffixes for floating point values. It allows you to specify real-world physical quantities in a sensible manner:

qspeed v = 180_km/h;
qtime week = 7_d;
qcurrent I = 10_kA; 
qmass m = 1_t;

It also converts Celsius and Fahrenheit to Kelvin.

Requirements

Because SI++ depends on custom literal suffixes, which is a C++11 feature, you'll need a compiler that supports it (and you'll need to compile in C++11 mode).

License

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details.