Connect++ 0.1
A fast, readable connection prover for first-order logic.
|
Simple function object for putting commas in lists. More...
#include <vic_strings.hpp>
Public Member Functions | |
comma ()=delete | |
Wouldn't make any sense. | |
comma (size_t _target) | |
Initialise with the length of the list you're printing. | |
string | operator() () |
The magic happens here! | |
Simple function object for putting commas in lists.
This avoids a load of repeated code when you have reason to output a lot of things with comma-separated lists.
Initialize the object with the actual length of the list you want to print.
Each time you call comma() you'll get a comma or an empty string with just enough commas to format the list correctly.