Files
allwpilib/upstream_utils/json_patches/0025-Make-bool-constructor-safe.patch

23 lines
647 B
Diff
Raw Normal View History

2026-03-29 15:37:32 -07:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Johnson <johnson.peter@gmail.com>
Date: Mon, 6 Apr 2026 17:49:08 -0700
Subject: [PATCH 25/25] Make bool constructor safe
---
json.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/json.h b/json.h
2026-07-02 02:10:52 -04:00
index ca7d76d837c9e0bdfb92e7c1b7bfd24cc8cb5ae2..cd9c52ba855c28bc4fd7316195bead50a709e184 100644
2026-03-29 15:37:32 -07:00
--- a/json.h
+++ b/json.h
@@ -167,7 +167,7 @@ class json
{
}
- constexpr json(bool value) : type_(Type::Bool), bool_value(value)
+ constexpr json(std::same_as<bool> auto value) : type_(Type::Bool), bool_value(value)
{
}