summaryrefslogtreecommitdiffstats
path: root/intl/icu4x-patches/003-explicit.patch
blob: 3b89ff36e485d43909894db4f2cf355c0fe81b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
diff --git a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
--- a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
@@ -109,17 +109,17 @@ class ICU4XDataProvider {
   /**
    * See the [Rust documentation for `new_with_fallbacker`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker) for more information.
    * 
    * Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html)
    */
   diplomat::result<std::monostate, ICU4XError> enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker);
   inline const capi::ICU4XDataProvider* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XDataProvider* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {}
+  inline explicit ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {}
   ICU4XDataProvider() = default;
   ICU4XDataProvider(ICU4XDataProvider&&) noexcept = default;
   ICU4XDataProvider& operator=(ICU4XDataProvider&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XDataProvider, ICU4XDataProviderDeleter> inner;
 };
 
 #include "ICU4XLocaleFallbacker.hpp"
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorLatin1 {
    * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
    * out of range of a 32-bit signed integer.
    * 
    * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
    */
   int32_t next();
   inline const capi::ICU4XLineBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLineBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {}
+  inline explicit ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {}
   ICU4XLineBreakIteratorLatin1() = default;
   ICU4XLineBreakIteratorLatin1(ICU4XLineBreakIteratorLatin1&&) noexcept = default;
   ICU4XLineBreakIteratorLatin1& operator=(ICU4XLineBreakIteratorLatin1&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLineBreakIteratorLatin1, ICU4XLineBreakIteratorLatin1Deleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorUtf16 {
    * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
    * out of range of a 32-bit signed integer.
    * 
    * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
    */
   int32_t next();
   inline const capi::ICU4XLineBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLineBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {}
+  inline explicit ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {}
   ICU4XLineBreakIteratorUtf16() = default;
   ICU4XLineBreakIteratorUtf16(ICU4XLineBreakIteratorUtf16&&) noexcept = default;
   ICU4XLineBreakIteratorUtf16& operator=(ICU4XLineBreakIteratorUtf16&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLineBreakIteratorUtf16, ICU4XLineBreakIteratorUtf16Deleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XLocale.hpp b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLocale.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
@@ -202,17 +202,17 @@ class ICU4XLocale {
   /**
    * Deprecated
    * 
    * Use `create_from_string("bn").
    */
   static ICU4XLocale create_bn();
   inline const capi::ICU4XLocale* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLocale* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {}
+  inline explicit ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {}
   ICU4XLocale() = default;
   ICU4XLocale(ICU4XLocale&&) noexcept = default;
   ICU4XLocale& operator=(ICU4XLocale&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLocale, ICU4XLocaleDeleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
@@ -40,17 +40,17 @@ class ICU4XLocaleFallbackIterator {
   /**
    * Performs one step of the fallback algorithm, mutating the locale.
    * 
    * See the [Rust documentation for `step`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step) for more information.
    */
   void step();
   inline const capi::ICU4XLocaleFallbackIterator* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLocaleFallbackIterator* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {}
+  inline explicit ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {}
   ICU4XLocaleFallbackIterator() = default;
   ICU4XLocaleFallbackIterator(ICU4XLocaleFallbackIterator&&) noexcept = default;
   ICU4XLocaleFallbackIterator& operator=(ICU4XLocaleFallbackIterator&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLocaleFallbackIterator, ICU4XLocaleFallbackIteratorDeleter> inner;
 };
 
 #include "ICU4XLocale.hpp"
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
@@ -53,17 +53,17 @@ class ICU4XLocaleFallbacker {
    * 
    * See the [Rust documentation for `for_config`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config) for more information.
    * 
    * Lifetimes: `this` must live at least as long as the output.
    */
   diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const;
   inline const capi::ICU4XLocaleFallbacker* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLocaleFallbacker* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {}
+  inline explicit ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {}
   ICU4XLocaleFallbacker() = default;
   ICU4XLocaleFallbacker(ICU4XLocaleFallbacker&&) noexcept = default;
   ICU4XLocaleFallbacker& operator=(ICU4XLocaleFallbacker&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLocaleFallbacker, ICU4XLocaleFallbackerDeleter> inner;
 };
 
 #include "ICU4XDataProvider.hpp"
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
@@ -38,17 +38,17 @@ class ICU4XLocaleFallbackerWithConfig {
    * 
    * See the [Rust documentation for `fallback_for`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for) for more information.
    * 
    * Lifetimes: `this` must live at least as long as the output.
    */
   ICU4XLocaleFallbackIterator fallback_for_locale(const ICU4XLocale& locale) const;
   inline const capi::ICU4XLocaleFallbackerWithConfig* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XLocaleFallbackerWithConfig* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {}
+  inline explicit ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {}
   ICU4XLocaleFallbackerWithConfig() = default;
   ICU4XLocaleFallbackerWithConfig(ICU4XLocaleFallbackerWithConfig&&) noexcept = default;
   ICU4XLocaleFallbackerWithConfig& operator=(ICU4XLocaleFallbackerWithConfig&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XLocaleFallbackerWithConfig, ICU4XLocaleFallbackerWithConfigDeleter> inner;
 };
 
 #include "ICU4XLocale.hpp"
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorLatin1 {
   /**
    * Return true when break boundary is word-like such as letter/number/CJK
    * 
    * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
    */
   bool is_word_like() const;
   inline const capi::ICU4XWordBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XWordBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {}
+  inline explicit ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {}
   ICU4XWordBreakIteratorLatin1() = default;
   ICU4XWordBreakIteratorLatin1(ICU4XWordBreakIteratorLatin1&&) noexcept = default;
   ICU4XWordBreakIteratorLatin1& operator=(ICU4XWordBreakIteratorLatin1&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XWordBreakIteratorLatin1, ICU4XWordBreakIteratorLatin1Deleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf16 {
   /**
    * Return true when break boundary is word-like such as letter/number/CJK
    * 
    * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
    */
   bool is_word_like() const;
   inline const capi::ICU4XWordBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XWordBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {}
+  inline explicit ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {}
   ICU4XWordBreakIteratorUtf16() = default;
   ICU4XWordBreakIteratorUtf16(ICU4XWordBreakIteratorUtf16&&) noexcept = default;
   ICU4XWordBreakIteratorUtf16& operator=(ICU4XWordBreakIteratorUtf16&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XWordBreakIteratorUtf16, ICU4XWordBreakIteratorUtf16Deleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf8 {
   /**
    * Return true when break boundary is word-like such as letter/number/CJK
    * 
    * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
    */
   bool is_word_like() const;
   inline const capi::ICU4XWordBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XWordBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {}
+  inline explicit ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {}
   ICU4XWordBreakIteratorUtf8() = default;
   ICU4XWordBreakIteratorUtf8(ICU4XWordBreakIteratorUtf8&&) noexcept = default;
   ICU4XWordBreakIteratorUtf8& operator=(ICU4XWordBreakIteratorUtf8&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XWordBreakIteratorUtf8, ICU4XWordBreakIteratorUtf8Deleter> inner;
 };
 
 
diff --git a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
--- a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
+++ b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
@@ -88,17 +88,17 @@ class ICU4XWordSegmenter {
    * 
    * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1) for more information.
    * 
    * Lifetimes: `this`, `input` must live at least as long as the output.
    */
   ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
   inline const capi::ICU4XWordSegmenter* AsFFI() const { return this->inner.get(); }
   inline capi::ICU4XWordSegmenter* AsFFIMut() { return this->inner.get(); }
-  inline ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {}
+  inline explicit ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {}
   ICU4XWordSegmenter() = default;
   ICU4XWordSegmenter(ICU4XWordSegmenter&&) noexcept = default;
   ICU4XWordSegmenter& operator=(ICU4XWordSegmenter&& other) noexcept = default;
  private:
   std::unique_ptr<capi::ICU4XWordSegmenter, ICU4XWordSegmenterDeleter> inner;
 };
 
 #include "ICU4XDataProvider.hpp"