---
name: "std::literals"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::literals/3cxx"
---

# std::literals(3cxx)

ISO C++ inline namespace for literal suffixes.

## NAME

std::literals - ISO C++ inline namespace for literal suffixes.

## SYNOPSIS

### Namespaces

namespace **chrono\_literals**\

### Functions

template\<char... \_Digits\> constexpr **chrono::hours** **operator''h** ()\
 Literal suffix for durations of type `std::chrono::hours`  constexpr **chrono::duration**\< long double, **ratio**\< 3600, 1 \> \> **operator''h** (long double **\_\_hours**)\
 Literal suffix for durations representing non-integer hours.  template\<char... \_Digits\> constexpr **chrono::minutes** **operator''min** ()\
 Literal suffix for durations of type `std::chrono::minutes`  constexpr **chrono::duration**\< long double, **ratio**\< 60, 1 \> \> **operator''min** (long double **\_\_mins**)\
 Literal suffix for durations representing non-integer minutes.  template\<char... \_Digits\> constexpr **chrono::milliseconds** **operator''ms** ()\
 Literal suffix for durations of type `std::chrono::milliseconds`  constexpr **chrono::duration**\< long double, **milli** \> **operator''ms** (long double **\_\_msecs**)\
 Literal suffix for durations representing non-integer milliseconds.  template\<char... \_Digits\> constexpr **chrono::nanoseconds** **operator''ns** ()\
 Literal suffix for durations of type `std::chrono::nanoseconds`  constexpr **chrono::duration**\< long double, **nano** \> **operator''ns** (long double **\_\_nsecs**)\
 Literal suffix for durations representing non-integer nanoseconds.  template\<char... \_Digits\> constexpr **chrono::seconds** **operator''s** ()\
 Literal suffix for durations of type `std::chrono::seconds`  **basic\_string**\< char \> **operator''s** (const char \***\_\_str**, size\_t **\_\_len**)\
 **basic\_string**\< **char16\_t** \> **operator''s** (const **char16\_t** \***\_\_str**, size\_t **\_\_len**)\
 **basic\_string**\< **char32\_t** \> **operator''s** (const **char32\_t** \***\_\_str**, size\_t **\_\_len**)\
 **basic\_string**\< wchar\_t \> **operator''s** (const wchar\_t \***\_\_str**, size\_t **\_\_len**)\
 constexpr **chrono::duration**\< long double \> **operator''s** (long double **\_\_secs**)\
 Literal suffix for durations representing non-integer seconds.  constexpr **basic\_string\_view**\< char \> **operator''sv** (const char \***\_\_str**, size\_t **\_\_len**) noexcept\
 constexpr **basic\_string\_view**\< **char16\_t** \> **operator''sv** (const **char16\_t** \***\_\_str**, size\_t **\_\_len**) noexcept\
 constexpr **basic\_string\_view**\< **char32\_t** \> **operator''sv** (const **char32\_t** \***\_\_str**, size\_t **\_\_len**) noexcept\
 constexpr **basic\_string\_view**\< wchar\_t \> **operator''sv** (const wchar\_t \***\_\_str**, size\_t **\_\_len**) noexcept\
 template\<char... \_Digits\> constexpr **chrono::microseconds** **operator''us** ()\
 Literal suffix for durations of type `std::chrono::microseconds`  constexpr **chrono::duration**\< long double, **micro** \> **operator''us** (long double **\_\_usecs**)\
 Literal suffix for durations representing non-integer microseconds.

## Detailed Description

ISO C++ inline namespace for literal suffixes.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
