When I see this, I was very shocked because I've never see this before and I never thought of it. You can look at this repo for more information about operator alternatives in CPP to enlarge your mind (:
So you are still using &&
🤔 You are just crazy, look at this alternative.
And yeah, I am using <% %>
for { }
like EJS
int main( )
<%
auto username = "swenenzy";
auto year = 2021;
// Look at this i'm using 'and' instead of && very strange right?
if ( username == "swenenzy" and year == 2021 ) <%
printf( "both sides are equal" );
%>
%>
Why not?
int main( )
<%
auto username = "swenenzy";
auto year = 2021;
if ( username == "swenenzy" or year == 2023 ) <%
printf( "one out of both correct\n" );
%>
%>
You can use includes like this syntax.
%:include <iostream>
Primary | Alternative |
---|---|
&& | and |
&= | and_eq |
& | bitand |
| | bitor |
~ | compl |
! | not |
!= | not_eq |
|| | or |
|= | or_eq |
^ | xor |
^= | xor_eq |
{ | <% |
} | %> |
[ | <: |
] | :> |
# | %: |
## | %:%: |
CPPReference has more detailed documentation, I'm writing this repo because I haven't seen it on github before.
You can give me suggestions with PR or ISSUES for improving this repo.
This documentation is all tested on C+14 to C+21.
Peace out 🖖