blob: da1cf702a6291c5e9a963479c70a65d97c1f11f6 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#include <fidl/test.arrays/cpp/natural_types.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
::test_arrays::StructSmallArray::Storage_ test_arrays::StructSmallArray::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_arrays::StructLargeArray::Storage_ test_arrays::StructLargeArray::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_arrays::TableSmallArray::Storage_ test_arrays::TableSmallArray::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_arrays::TableLargeArray::Storage_ test_arrays::TableLargeArray::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
std::shared_ptr<::test_arrays::UnionSmallArray::Storage_> test_arrays::UnionSmallArray::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)));
default:
return std::make_shared<Storage_>();
}
}
std::shared_ptr<::test_arrays::UnionLargeArray::Storage_> test_arrays::UnionLargeArray::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)));
default:
return std::make_shared<Storage_>();
}
}
#pragma clang diagnostic pop