Skip to content

Commit f0c6f54

Browse files
authored
Merge pull request #1971 from gamecentric/main
Fixes error C4426 (optimization flags changed after including header) on MSVC
2 parents 6cdd36c + 921e01f commit f0c6f54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/stdexec/__detail/__config.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ namespace STDEXEC::__std
402402
#endif
403403

404404
#if STDEXEC_MSVC()
405-
# define STDEXEC_PRAGMA_OPTIMIZE_BEGIN() STDEXEC_PRAGMA(optimize("", on))
406-
# define STDEXEC_PRAGMA_OPTIMIZE_END() STDEXEC_PRAGMA(optimize("", off))
405+
# define STDEXEC_PRAGMA_OPTIMIZE_BEGIN() STDEXEC_PRAGMA(optimize("t", on))
406+
# define STDEXEC_PRAGMA_OPTIMIZE_END() STDEXEC_PRAGMA(optimize("", on))
407407
#else
408408
# define STDEXEC_PRAGMA_OPTIMIZE_BEGIN() STDEXEC_PRAGMA(GCC push_options) \
409409
STDEXEC_PRAGMA(GCC optimize("O3"))

0 commit comments

Comments
 (0)