mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
more const
This commit is contained in:
parent
681346fde1
commit
3dd9a98926
@ -34,7 +34,7 @@ template <typename T, typename UC = char,
|
|||||||
typename = FASTFLOAT_ENABLE_IF(is_supported_float_type<T>::value)>
|
typename = FASTFLOAT_ENABLE_IF(is_supported_float_type<T>::value)>
|
||||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||||
from_chars(UC const *first, UC const *last, T &value,
|
from_chars(UC const *first, UC const *last, T &value,
|
||||||
chars_format fmt = chars_format::general) noexcept;
|
chars_format const fmt = chars_format::general) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Like from_chars, but accepts an `options` argument to govern number parsing.
|
* Like from_chars, but accepts an `options` argument to govern number parsing.
|
||||||
@ -51,7 +51,7 @@ from_chars_advanced(UC const *first, UC const *last, T &value,
|
|||||||
template <typename T, typename UC = char,
|
template <typename T, typename UC = char,
|
||||||
typename = FASTFLOAT_ENABLE_IF(is_supported_integer_type<T>::value)>
|
typename = FASTFLOAT_ENABLE_IF(is_supported_integer_type<T>::value)>
|
||||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||||
from_chars(UC const *first, UC const *last, T &value, int base = 10) noexcept;
|
from_chars(UC const *first, UC const *last, T &value, int const base = 10) noexcept;
|
||||||
|
|
||||||
} // namespace fast_float
|
} // namespace fast_float
|
||||||
|
|
||||||
|
|||||||
@ -187,7 +187,7 @@ template <> struct from_chars_caller<std::float64_t> {
|
|||||||
template <typename T, typename UC, typename>
|
template <typename T, typename UC, typename>
|
||||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||||
from_chars(UC const *first, UC const *last, T &value,
|
from_chars(UC const *first, UC const *last, T &value,
|
||||||
chars_format fmt /*= chars_format::general*/) noexcept {
|
chars_format const fmt /*= chars_format::general*/) noexcept {
|
||||||
return from_chars_caller<T>::call(first, last, value,
|
return from_chars_caller<T>::call(first, last, value,
|
||||||
parse_options_t<UC>(fmt));
|
parse_options_t<UC>(fmt));
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value,
|
|||||||
|
|
||||||
template <typename T, typename UC, typename>
|
template <typename T, typename UC, typename>
|
||||||
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
|
||||||
from_chars(UC const *first, UC const *last, T &value, int base) noexcept {
|
from_chars(UC const *first, UC const *last, T &value, int const base) noexcept {
|
||||||
|
|
||||||
static_assert(is_supported_integer_type<T>::value,
|
static_assert(is_supported_integer_type<T>::value,
|
||||||
"only integer types are supported");
|
"only integer types are supported");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user