11

If I recall correctly, I saw some ungodly C++ library that let you type ASCII-art shapes in C++ programs and treat them as objects. Something like this:

int area = someFreakyClass(o-----o
                           |     |
                           o-----o).area();

What was this library called?

Kijewski
  • 25,517
  • 12
  • 101
  • 143
Maxpm
  • 24,113
  • 33
  • 111
  • 170

3 Answers3

16

Analog Literals by Eelis.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
10

Improved version of Analog Literals:

Tweaking Analog Literals (C++ humor)

Nawaz
  • 353,942
  • 115
  • 666
  • 851
3

Something like this:

 int area = someFreakyClass(_________________________________________________
                    /|     |                                                 |
                    ||     |                                                 |
               .----|-----,|                                                 |
               ||  ||   ==||                                                 |
          .-----'--'|   ==||                                                 |
          |)-      ~|     ||_________________________________________________|
          | ___     |     |____...==..._  >\______________________________|
     [_/.-.\"--"-------- //.-.  .-.\\/   |/            \\ .-.  .-. //
       ( o )`==="""""""""`( o )( o )     o              `( o )( o )`
        '-'                '-'  '-'                       '-'  '-').area();
Scherbius.com
  • 3,396
  • 4
  • 24
  • 44