“有趣”解释代码中ASCII数字的C ++库-它叫什么? (“多维模拟文字”) [英] "Fun" C++ library that interprets ASCII figures in code - what is it called? ("Multi-Dimensional Analog Literals")
本文介绍了“有趣”解释代码中ASCII数字的C ++库-它叫什么? (“多维模拟文字”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
前一段时间,我偶然发现了C ++ gem,这是一组通过运算符重载以及可能的预处理器技巧而产生的类,可让您使用代码内ASCII艺术定义变量:
A while ago I stumbled upon a C++ gem, a set of classes that through operator overloading and possibly some preprocessor tricks, let you define variables using in-code ASCII art:
Line x = |-----|; //x is 5
Line y = |---|; //y is 3
Rectangle r = +---+
| |
+---+; //r is 3 by 1
和IIRC,它甚至还支持3D数字!
and IIRC, it even had support for 3D figures!
但是对于我来说,我不记得这个库/头文件/类集的名称。
But for the life of me I cannot remember the name of this library/header file/set of classes. What is it called?
推荐答案
我相信您是在追求多维模拟文字
I believe you are after Multi-Dimensional Analog Literals
http://www.eelis.net/C++/analogliterals.xhtml
这篇关于“有趣”解释代码中ASCII数字的C ++库-它叫什么? (“多维模拟文字”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文