2008-07-11
■[C++] ゆの in FC++
ゆの in language というのが流行ってるようなのでやってみました(元ネタ知らないですけど)
FC++ の placeholder を使ってるのと、文字列リテラルを使ってないくらいです
#include <iostream> #include <boost/fcpp/prelude.hpp> using namespace std; using namespace boost::fcpp; #define VARIABLE_NAME(Variable) #Variable static const int X = 1; const struct next_week {} 来週も見てくださいね!; const struct hidamari {} ひだまりスケッチ365; void operator<(int, const next_week&) { cout << VARIABLE_NAME(来週も見てくださいね!) << endl; } const auto_curry_type& operator/(int, const auto_curry_type& x) { return x; } int operator/(const auto_curry_type&, int) { cout << VARIABLE_NAME(ひだまりスケッチ365); return 1; } int main() { X / _ / X < 来週も見てくださいね!; return 0; }
Boost.MPL の placeholder でどうにかならないかなー
でもあれ型だしなー
Cry’s Diary - ゆの in むぅぶせまんちくす!
Yet Another Ranha - ゆの in Haskell
k.inaba さんと矢野さんの、ゆの in Java にしびれました
言語で遊べる人はカッコイイなー
トラックバック - http://d.hatena.ne.jp/faith_and_brave/20080711/1215763840
リンク元
- 19 http://b.hatena.ne.jp/entrylist?sort=hot
- 17 http://b.hatena.ne.jp/
- 13 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4SUNA_jaJP272JP273&q=c+降順
- 11 http://b.hatena.ne.jp/cho45/?????? in language/
- 7 http://b.hatena.ne.jp/entrylist?url=http://&threshold=3
- 7 http://d.hatena.ne.jp/yaneurao/
- 6 http://b.hatena.ne.jp/entry/http://d.hatena.ne.jp/t_yano/20080711/1215747589
- 6 http://b.hatena.ne.jp/entrylist?sort=hot&url=http://d.hatena.ne.jp/
- 6 http://d.hatena.ne.jp/
- 6 http://d.hatena.ne.jp/Cryolite/20080710