mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 07:18:02 -06:00
This commit adds support for hosting on windows, as well as better support for the Visual C++ compiler. Specific interesting changes are: - switch from /FAsc to /FA - order functions in file order - support demangling win32-style identifiers with undname - clang++ and vc++ on win32 host are both supported
15 lines
383 B
C++
Generated
15 lines
383 B
C++
Generated
// compile flags:
|
|
// [amd64] cl /FA /EHsc /c vc-main-opt-out-example.cpp /FAvc-main-opt-out.asm
|
|
// then, replace the filename for <array> with std\array
|
|
#include <array>
|
|
|
|
template <int... vars>
|
|
constexpr auto make_array() {
|
|
return std::array<int, sizeof...(vars)>{vars...};
|
|
}
|
|
|
|
int main() {
|
|
constexpr auto a = make_array<1, 3, 4, 2, 3, 5, 6, 4, 8, 9, 2>();
|
|
|
|
return a[2];
|
|
} |