Skip to content

Commit

Permalink
fix SCN_HAS_STD_REGEX_MULTILINE marco
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayuehua committed Oct 19, 2024
1 parent da5024e commit 0249a3d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
21 changes: 21 additions & 0 deletions ports/scnlib/fix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/include/scn/fwd.h b/include/scn/fwd.h
index 9b4892f..018a4f4 100644
--- a/include/scn/fwd.h
+++ b/include/scn/fwd.h
@@ -739,11 +739,11 @@ SCN_GCC_POP
#endif

// Detect std::regex_constants::multiline:
-// libc++ 15 and later, or libstdc++ 11.4 or later
-// (2021-09-29 is the date of the commit introducing `multiline`,
-// libstdc++ doesn't support checking for minor versions)
-#if SCN_STDLIB_LIBCPP >= 15000 || SCN_STDLIB_GLIBCXX >= 12 || \
- (SCN_STDLIB_GLIBCXX == 11 && __GLIBCXX__ >= 20210929L)
+// libc++ 15 and later, or libstdc++ 12 or later
+
+
+#if SCN_STDLIB_LIBCPP >= 15000 || SCN_STDLIB_GLIBCXX >= 12
+
#define SCN_HAS_STD_REGEX_MULTILINE 1
#else
#define SCN_HAS_STD_REGEX_MULTILINE 0
1 change: 1 addition & 0 deletions ports/scnlib/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "scnlib",
"version": "3.0.1",
"port-version": 1,
"description": "scnlib is a modern C++ library for replacing scanf and std::istream",
"homepage": "https://scnlib.dev/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8106,7 +8106,7 @@
},
"scnlib": {
"baseline": "3.0.1",
"port-version": 0
"port-version": 1
},
"scope-guard": {
"baseline": "1.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/scnlib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ead098e5e91b1454aa1e8570a2b11c5a52416989",
"version": "3.0.1",
"port-version": 1
},
{
"git-tree": "cbbd6d359bd0838808caa2ffd0982f87c8587fab",
"version": "3.0.1",
Expand Down

0 comments on commit 0249a3d

Please sign in to comment.