stim::literals namespace inline

User-defined literals for stim types.

Functions

auto operator""_ms(unsigned long long ms) -> duration constexpr noexcept
Creates a stim::duration representing milliseconds.
auto operator""_ms(long double ms) -> duration constexpr noexcept
Creates a stim::duration representing milliseconds.
auto operator""_ns(unsigned long long ns) -> duration constexpr noexcept
Creates a stim::duration representing nanoseconds.
auto operator""_ns(long double ns) -> duration constexpr noexcept
Creates a stim::duration representing nanoseconds.
auto operator""_s(unsigned long long s) -> duration constexpr noexcept
Creates a stim::duration representing seconds.
auto operator""_s(long double s) -> duration constexpr noexcept
Creates a stim::duration representing seconds.
auto operator""_sv(const char* str, size_t len) -> string_view constexpr noexcept
Creates a string_view.
auto operator""_us(unsigned long long us) -> duration constexpr noexcept
Creates a stim::duration representing microseconds.
auto operator""_us(long double us) -> duration constexpr noexcept
Creates a stim::duration representing microseconds.

Function documentation

duration stim::literals::operator""_ms(unsigned long long ms) constexpr noexcept

Creates a stim::duration representing milliseconds.

using namespace stim::literals;

constexpr stim::duration one_millisec = 1_ms;

duration stim::literals::operator""_ms(long double ms) constexpr noexcept

Creates a stim::duration representing milliseconds.

using namespace stim::literals;

constexpr stim::duration pi_millisec = 3.14_ms;

duration stim::literals::operator""_ns(unsigned long long ns) constexpr noexcept

Creates a stim::duration representing nanoseconds.

using namespace stim::literals;

constexpr stim::duration one_nanosec = 1_ns;

duration stim::literals::operator""_ns(long double ns) constexpr noexcept

Creates a stim::duration representing nanoseconds.

using namespace stim::literals;

constexpr stim::duration pi_nanosec = 3.14_ns;

duration stim::literals::operator""_s(unsigned long long s) constexpr noexcept

Creates a stim::duration representing seconds.

using namespace stim::literals;

constexpr stim::duration one_sec = 1_s;

duration stim::literals::operator""_s(long double s) constexpr noexcept

Creates a stim::duration representing seconds.

using namespace stim::literals;

constexpr stim::duration pi_sec = 3.14_s;

string_view stim::literals::operator""_sv(const char* str, size_t len) constexpr noexcept

Creates a string_view.

using namespace stim::literals;

constexpr stim::string_view str = "Klaatu barada nikto!"_sv;

duration stim::literals::operator""_us(unsigned long long us) constexpr noexcept

Creates a stim::duration representing microseconds.

using namespace stim::literals;

constexpr stim::duration one_microsec = 1_us;

duration stim::literals::operator""_us(long double us) constexpr noexcept

Creates a stim::duration representing microseconds.

using namespace stim::literals;

constexpr stim::duration pi_microsec = 3.14_us;