#include <iostream>
using namespace std;
class ParserResult
{
public:
/// Default construction to invalid state (no initialization of storage required)
ParserResult() : ray_header_{nullptr} {std:: cout << "Called ParserResult()" << std::endl;}
ParserResult(ParserResult const &other) = default;
ParserResult &operator=(ParserResult const &other) = default;
ParserResult(ParserResult &&other) noexcept = default;
ParserResult &operator=(ParserResult &&other) noexcept = default;
~ParserResult() = default;
/// Accessors to get the parsed ray view
// auto getParsedRay() const
// {
// return ParsedRayView{ray_header_, e2e_trailer_, tcb::span<SitedChannelView const, MAX_NUM_SITED_CHANNELS>{sited_channel_storage(), MAX_NUM_SITED_CHANNELS}};
// }
/// Accessors to get the number of bytes consumed from the raw data
auto getNumBytesConsumed() const { return num_bytes_consumed_; }
public:
uint32_t const *ray_header_;
uint32_t const *e2e_trailer_;
/// The number of bytes consumed from the raw data
std::size_t num_bytes_consumed_;
/// Uninitialized storage for sited channel views (avoids zeroing on construction)
/// Valid items are populated by parsePacket and accessed via sited_channel_storage()
// alignas(SitedChannelView) std::byte sited_channel_storage_raw_[sizeof(SitedChannelView) * MAX_NUM_SITED_CHANNELS];
/// Access storage as array of SitedChannelView (const)
// SitedChannelView const *sited_channel_storage() const
// {
// return std::launder(reinterpret_cast<SitedChannelView const *>(sited_channel_storage_raw_));
// }
// /// Access storage as array of SitedChannelView (mutable)
// SitedChannelView *sited_channel_storage()
// {
// return std::launder(reinterpret_cast<SitedChannelView *>(sited_channel_storage_raw_));
// }
/// Friends to set the member data
// friend auto parsePacket(tcb::span<std::uint8_t const> const raw_data) -> ParserResult;
// friend auto detail::makeParserResult(ParsedRayView const &parsed_ray, std::size_t const num_bytes_consumed) -> ParserResult;
};
int main() {
// your code goes here
int x = 8;
int y = 9;
std::cout << x << y << std::endl;
ParserResult result;
std::cout << result.ray_header_ << " " << result.e2e_trailer_ << " " << result.num_bytes_consumed_ << std::endl;
auto result2 = ParserResult{};
std::cout << result2.ray_header_ << " " << result2.e2e_trailer_ << " " << result2.num_bytes_consumed_ << std::endl;
return 0;
}