“Fun” C++ library that interprets ASCII figures in code - what is it called? (“Multi-Dimensional Analog Literals”)

邮差的信 提交于 2019-11-28 21:08:13

问题


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

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?


回答1:


I believe you are after Multi-Dimensional Analog Literals

http://www.eelis.net/C++/analogliterals.xhtml



来源:https://stackoverflow.com/questions/885819/fun-c-library-that-interprets-ascii-figures-in-code-what-is-it-called-m

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!