Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

gcc 9.3.0

Options
Optimization
Boost 1.73.0
C++2a
no pedantic

Author

anonymous

about 4 years ago

phoeni_x3.hpp
quote_esc.hpp

$ g++ prog.cc -O2 -march=native -I/opt/wandbox/boost-1.73.0/gcc-9.3.0/include -std=c++2a
----------------------------------------------
OUTPUT: 0 ← "1 + ( 2 - 3 )"
----------------------------------------------
OUTPUT: 6.25 ← "( ( 1 + ( 2 - 3 ) + 5 ) / 2 ) ^ 2"
----------------------------------------------
OUTPUT: 14 ← "5 + ( ( 1 + 2 ) * 4 ) - 3"
----------------------------------------------
OUTPUT: 7 ← "3+4"
----------------------------------------------
OUTPUT: 11 ← "3+4*2"
----------------------------------------------
OUTPUT: 11 ← "3+(4*2)"
----------------------------------------------
OUTPUT: 14 ← "(3+4)*2"
----------------------------------------------
OUTPUT: 128 ← "2*2* 2* 2  * 2\t*2\n*2"
----------------------------------------------
Expecting ')' in "(2"
  (2
    ^--- here
----------------------------------------------
Expecting term in "(2+/"
  (2+/
     ^--- here
----------------------------------------------
Expecting term in "42*()"
  42*()
      ^--- here
----------------------------------------------
Expecting ')' in "(2*2* 2* 2  * 2\t*2\n*2"
  *2
    ^--- here
Exit Code:
0