mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
23 lines
647 B
Diff
23 lines
647 B
Diff
|
|
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
|
||
|
|
index 31c5ea39b67286df158a9d6e13ab5073498126b8..2746badf92a5bb4de6c38007d8e6dcfbed5b47eb 100644
|
||
|
|
--- 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)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|