blob: 8bf9c480adbb259063d2880a80e766ee51d10df5 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#include <fidl/test.unionsandwich/cpp/natural_types.h>
::test_unionsandwich::SandwichUnionSize8Alignment4::Storage_
test_unionsandwich::SandwichUnionSize8Alignment4::CloneStorage_() const {
return Storage_{::fidl::internal::NaturalClone(storage_.before),
::fidl::internal::NaturalClone(storage_.union_),
::fidl::internal::NaturalClone(storage_.after)};
}
::test_unionsandwich::SandwichUnionSize36Alignment4::Storage_
test_unionsandwich::SandwichUnionSize36Alignment4::CloneStorage_() const {
return Storage_{::fidl::internal::NaturalClone(storage_.before),
::fidl::internal::NaturalClone(storage_.union_),
::fidl::internal::NaturalClone(storage_.after)};
}
::test_unionsandwich::SandwichUnionSize12Alignment4::Storage_
test_unionsandwich::SandwichUnionSize12Alignment4::CloneStorage_() const {
return Storage_{::fidl::internal::NaturalClone(storage_.before),
::fidl::internal::NaturalClone(storage_.union_),
::fidl::internal::NaturalClone(storage_.after)};
}
::test_unionsandwich::StructSize16Alignment8::Storage_
test_unionsandwich::StructSize16Alignment8::CloneStorage_() const {
return Storage_{::fidl::internal::NaturalClone(storage_.f1),
::fidl::internal::NaturalClone(storage_.f2)};
}
::test_unionsandwich::SandwichUnionSize24Alignment8::Storage_
test_unionsandwich::SandwichUnionSize24Alignment8::CloneStorage_() const {
return Storage_{::fidl::internal::NaturalClone(storage_.before),
::fidl::internal::NaturalClone(storage_.union_),
::fidl::internal::NaturalClone(storage_.after)};
}
std::shared_ptr<::test_unionsandwich::UnionSize8Alignment4::Storage_>
test_unionsandwich::UnionSize8Alignment4::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_unionsandwich::UnionSize36Alignment4::Storage_>
test_unionsandwich::UnionSize36Alignment4::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_unionsandwich::UnionSize12Alignment4::Storage_>
test_unionsandwich::UnionSize12Alignment4::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_unionsandwich::UnionSize24Alignment8::Storage_>
test_unionsandwich::UnionSize24Alignment8::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_>();
}
}