| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.error/cpp/natural_types.h> |
| |
| ::test_error::ExampleFooResponse::Storage_ |
| test_error::ExampleFooResponse::CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.y)}; |
| } |
| |
| ::test_error::ExampleFooTopResponse::Storage_ |
| test_error::ExampleFooTopResponse::CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.result)}; |
| } |
| |
| ::test_error::ExampleFooRequest::Storage_ |
| test_error::ExampleFooRequest::CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.s)}; |
| } |
| |
| std::shared_ptr<::test_error::ExampleFooResult::Storage_> |
| test_error::ExampleFooResult::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| case 2: |
| return std::make_shared<Storage_>( |
| std::in_place_index<2>, |
| ::fidl::internal::NaturalClone(std::get<2>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |