Commit 4bd07a7
fix(variant): Variant string conversion logic on creation (#15855)
Summary:
Pull Request resolved: #15855
Fixing two issues with variant creation:
- Variant::create() was relying on implicit conversion from StringView into
std::string. It also did not support construction with std::string_view.
Adding overloads to make them explicit.
- Variant::typeWithCustomComparison() was also relying on implicit conversion.
Making the conversion explicit.
Reviewed By: mbasmanova
Differential Revision: D89753870
fbshipit-source-id: 932417f82b115bfcb6314f46d00315ec75f303221 parent 3d614a1 commit 4bd07a7
2 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
157 | 154 | | |
158 | 155 | | |
159 | 156 | | |
| |||
338 | 335 | | |
339 | 336 | | |
340 | 337 | | |
341 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
342 | 357 | | |
343 | 358 | | |
344 | 359 | | |
| |||
489 | 504 | | |
490 | 505 | | |
491 | 506 | | |
| 507 | + | |
492 | 508 | | |
493 | 509 | | |
494 | | - | |
495 | | - | |
| 510 | + | |
| 511 | + | |
496 | 512 | | |
497 | 513 | | |
498 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| |||
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
139 | 157 | | |
140 | 158 | | |
141 | 159 | | |
| |||
0 commit comments