#pragma once #include /// @brief The reproduction of Rust Option type. /// @details /// This namespace reproduce Rust Option type, and its members Some and None in C++. /// However Option is not important than Result, so its implementation is very casual. namespace yycc::rust::option { template using Option = std::optional; template OptionType Some(Args &&... args) { return OptionType(std::in_place, std::forward(args)...); } template OptionType None() { return OptionType(std::nullopt); } }