AirlineTicket 1.0.12
Loading...
Searching...
No Matches
modern_paradigm.cppm File Reference
import std;

Go to the source code of this file.

Classes

struct  modern::Price
 价格强类型(整型分) More...
struct  modern::Quantity
 数量强类型(整型单位) More...

Namespaces

namespace  modern

Enumerations

enum class  modern::ParseErr : int { modern::empty = 1 , modern::invalid = 2 , modern::overflow = 3 }
 价格字符串解析的可恢复错误码 More...

Functions

std::expected< Price, ParseErr > modern::parse_price_cents (std::string_view s)
 解析 ASCII 数字分字符串;失败返回 ParseErr
std::int64_t modern::sum_cents (std::span< Price const > prices) noexcept
 对价格 span 求和(零拷贝)