Is this just a standard C++ application, or does it involve Cocoa libraries, or C++nn/C++2a standard code? There are extensive clang++ compiler switches available, including some that may be beneficial for a vector application:
[xcrun] clang++ --help
This will automatically use the standard c++ library libc++, but does not account for helping it find custom header, or library locations, or any other C++ code dependencies:
clang++ -Oz -o vector ./vector.cpp
What C++ libraries are available? Deliberately issue a bogus library name:
[xcrun] clang++ -Oz -o vector ./vector.app -std=cxx17
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
If you are using the command-line tools, you can ignore the [xcrun] as that is used when only Xcode is installed.