https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83018
Bug ID: 83018 Summary: To support creation of header-only C++ libraries with SIMD optimization and dynamic dispatch, allow all intrinsics regardless of target architecture Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kerukuro at gmail dot com Target Milestone: --- Visual C++ already does this. Using Visual C++, I can use e.g. AVX2 intrinsics in a program compiled with SSE2 target architecture and dispatch to that code path dynamically if CPU supports AVX2. GCC requires compiling separate object files to achieve that, which is not possible for header-only libraries.