forked from cppfastio/fast_io
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cppfastio#869 from ikspress/simplify
Simplify the handling of macros and warnings
- Loading branch information
Showing
25 changed files
with
264 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#pragma once | ||
#if !defined(__cplusplus) | ||
#error "You are not using a C++ compiler" | ||
#endif | ||
|
||
#if !defined(__cpp_concepts) | ||
#error "fast_io requires at least C++20 standard compiler." | ||
#else | ||
#include "fast_io_hosted.h" | ||
|
||
#if defined(_MSC_VER) && !defined(__clang__) | ||
#pragma warning(push) | ||
#pragma warning(disable : 4514) | ||
#endif | ||
#include "fast_io_legacy_impl/io.h" | ||
#endif | ||
#if defined(_MSC_VER) && !defined(__clang__) | ||
#pragma warning(pop) | ||
#endif | ||
#pragma once | ||
#if !defined(__cplusplus) | ||
#error "You are not using a C++ compiler" | ||
#endif | ||
|
||
#if !defined(__cpp_concepts) | ||
#error "fast_io requires at least C++20 standard compiler." | ||
#else | ||
|
||
#include "fast_io_hosted.h" | ||
|
||
#include "fast_io_dsal/impl/misc/push_warnings.h" | ||
|
||
#include "fast_io_legacy_impl/io.h" | ||
|
||
#include "fast_io_dsal/impl/misc/pop_warnings.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Please keep it in reverse order with the macros in push_macros.h | ||
#pragma pop_macro("erase") | ||
#pragma pop_macro("move") | ||
#pragma pop_macro("refresh") | ||
#pragma pop_macro("max") | ||
#pragma pop_macro("min") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#if defined(_MSC_VER) && !defined(__clang__) | ||
#pragma warning(pop) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma push_macro("min") | ||
#undef min | ||
|
||
#pragma push_macro("max") | ||
#undef max | ||
|
||
#pragma push_macro("refresh") | ||
#undef refresh | ||
|
||
#pragma push_macro("move") | ||
#undef move | ||
|
||
#pragma push_macro("erase") | ||
#undef erase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifdef _MSC_VER | ||
#pragma warning(push) | ||
#pragma warning(disable : 4061) | ||
#pragma warning(disable : 4365) | ||
#pragma warning(disable : 4464) | ||
#pragma warning(disable : 4514) | ||
#pragma warning(disable : 4623) | ||
#pragma warning(disable : 4626) | ||
#pragma warning(disable : 4668) | ||
#pragma warning(disable : 4710) | ||
#pragma warning(disable : 4711) | ||
#pragma warning(disable : 4820) | ||
#pragma warning(disable : 5027) | ||
#pragma warning(disable : 5045) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.