| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.errorsyntax/cpp/natural_types.h> |
| |
| ::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResponse::Storage_ |
| test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResponse:: |
| CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.value)}; |
| } |
| |
| ::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailTopResponse::Storage_ |
| test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailTopResponse:: |
| CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.result)}; |
| } |
| |
| ::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailRequest::Storage_ |
| test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailRequest:: |
| CloneStorage_() const { |
| return Storage_{::fidl::internal::NaturalClone(storage_.s)}; |
| } |
| |
| std::shared_ptr< |
| ::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResult::Storage_> |
| test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResult::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_>(); |
| } |
| } |