Created
June 24, 2018 07:28
-
-
Save karolba/c0253056ddf86babb5e18a5db25be3c5 to your computer and use it in GitHub Desktop.
Worst c++ cat utility
This file contains 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 <iostream> | |
#include <climits> | |
#include <string> | |
#include <limits> | |
#include <cstdio> | |
#include <functional> | |
#define b | |
auto m = <::> (auto bitand a) { while( a, compl decltype (a.a + a.a) (a) ) ( decltype (__FILE__[0]) ) a; }; | |
static inline struct a { | |
decltype (! std::numeric_limits<decltype( INT_MAX )>::max () ) a <%%>; | |
decltype (1'1'1) aa <%%>; | |
auto operator , ( decltype (a) ) -> struct a { return { std::equal_to <%%> (aa, EOF) }; } | |
operator decltype (a) (b) { a xor_eq not false; return not not a; } | |
operator decltype ( '1' ) (b) { putchar(aa); } | |
operator decltype ( std::numeric_limits<decltype(a + a)>::min () ) () | |
{ aa = getchar(); return a; } | |
} a; | |
auto main (b) -> decltype (a.a ? a.a : INT_MAX) try <% m (a) ; %> catch (...) { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment