I finally know how to see the command generated by Xcode. I will leave the steps here.
The current Xcode 9.2 is using -std=c++1z. Even though it has the options to use -std=c++17, it is still compiling using c++1z.
In order to see the exact command, you need to use the "Report Navigator".
In the "Report Navigator" you must click on a build process on the left and enable "All Messages".
After that you will see a line for each file Xcode is compiling.
To see the details, you must click on the lines icon on the right of the list entry.
Doing that, Xcode will open up the exact build command used.
I will need to wait for Xcode 9.3 in order to use the "-std=c++17" in Terminal. It seams the Xcode 9.3 beta already has it.