FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::literals Namespace Reference

Exact literals, parsed at compile time: 100.25_px, 0.01_qty (up to 8 decimals), 5_bps, 0.25_bps (up to 4 decimals). More decimals, or a value out of range, is a compile error. An inline namespace, so using namespace fastmm; brings them in too (like std::literals). More...

Functions

constexpr Price operator""_px (unsigned long long v) noexcept
 100_px == Price::from_int(100).
 
constexpr Qty operator""_qty (unsigned long long v) noexcept
 
template<char... Cs>
constexpr Price operator""_px () noexcept
 
template<char... Cs>
constexpr Qty operator""_qty () noexcept
 
template<char... Cs>
constexpr Ratio operator""_bps () noexcept
 

Detailed Description

Exact literals, parsed at compile time: 100.25_px, 0.01_qty (up to 8 decimals), 5_bps, 0.25_bps (up to 4 decimals). More decimals, or a value out of range, is a compile error. An inline namespace, so using namespace fastmm; brings them in too (like std::literals).

Function Documentation

◆ operator""_px() [1/2]

constexpr Price fastmm::literals::operator""_px ( unsigned long long  v)
constexprnoexcept

100_px == Price::from_int(100).

◆ operator""_qty() [1/2]

constexpr Qty fastmm::literals::operator""_qty ( unsigned long long  v)
constexprnoexcept

◆ operator""_px() [2/2]

template<char... Cs>
constexpr Price fastmm::literals::operator""_px ( )
constexprnoexcept

< checked by the static_assert above

◆ operator""_qty() [2/2]

template<char... Cs>
constexpr Qty fastmm::literals::operator""_qty ( )
constexprnoexcept

< checked by the static_assert above

◆ operator""_bps()

template<char... Cs>
constexpr Ratio fastmm::literals::operator""_bps ( )
constexprnoexcept

< checked by the static_assert above