blob: 30c9995d4aeeabff71475ae87c9439de16488cfb [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#include <fidl/test.errorsyntax/cpp/natural_types.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailRequest::Storage_ test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailRequest::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.s)};
}
::test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResponse::Storage_ test_errorsyntax::ExampleUseOfErrorSyntaxCallWhichMayFailResponse::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.value)};
}
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_>();
}
}
#pragma clang diagnostic pop