This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expressive Pi | |
// ------------- | |
// | |
// Fluent C++ Blog Post: The Pi Day Challenge for Expressive Code | |
// http://www.fluentcpp.com/2017/03/02/the-pi-day-challenge-for-expressive-code-in-c/ | |
// | |
// Author: William Killian | |
// Email: [email protected] | |
// Github: http://www.github.com/willkill07 | |
// Website: https://www.eecis.udel.edu/~wkillian |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <tuple> | |
#include <iostream> | |
// Link: https://github.com/aeyakovenko/notes | |
//count arguments | |
//COUNT_ARGS :: ... -> Int | |
#define COUNT_ARGS(...) COUNT_ARGS_(,##__VA_ARGS__,6,5,4,3,2,1,0) | |
#define COUNT_ARGS_(z,a,b,c,d,e,f,cnt,...) cnt |