| 329 | |
| 330 | template <typename Visitor> |
| 331 | decltype(auto) Visit(Visitor&& visitor) const { |
| 332 | switch (GetKind()) { |
| 333 | case ByteStringKind::kSmall: |
| 334 | return std::forward<Visitor>(visitor)(GetSmall()); |
| 335 | case ByteStringKind::kMedium: |
| 336 | return std::forward<Visitor>(visitor)(GetMedium()); |
| 337 | case ByteStringKind::kLarge: |
| 338 | return std::forward<Visitor>(visitor)(GetLarge()); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | friend void swap(ByteString& lhs, ByteString& rhs) { |
| 343 | if (&lhs != &rhs) { |
no test coverage detected