In C++ I can define an alias to existing type via typedef
statement.
But can one create an alias to an operator?
To be specific, I want to pick some Unicode symbol and create an alias to <<
operator.
I would like to use for example "Vertical Four Dots" U+205E
:
cout
⁞ endl ⁞ "filename: " ⁞ cfgfilename
⁞ endl ⁞ "message: " ⁞ e.what()
⁞ endl ⁞ "exception id: " ⁞ e.id
⁞ endl ⁞ "byte position: " ⁞ e.byte ;
Instead of this:
cout
<< endl << "filename: " << cfgfilename
<< endl << "message: " << e.what()
<< endl << "exception id: " << e.id
<< endl << "byte position: " << e.byte ;
If it is not possible with the Four Dots character, but some other symbols, it could be an option as well (though it would be good to have more options than basic ASCII).