-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
apienhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Suggested API:
// numeric conversions
template <size_t N>
constexpr int stoi(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr unsigned stou(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr long stol(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr unsigned long stoul(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr long long stoll(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr unsigned long long stoull(const fixed_string<N>& str, int base = 10);
template <size_t N>
constexpr float stof(const fixed_string<N>& str);
template <size_t N>
constexpr double stod(const fixed_string<N>& str);
template <size_t N>
constexpr long double stold(const fixed_string<N>& str);
template <auto val> // where decltype(val) is an integral type but not any of char types
constexpr fixed_string</*...*/> to_fixed_string() noexcept;
Proposed implementation: using to_chars
and from_chars
from <charconv>
Known issues: cannot be really constexpr
- Create implementation
- Create tests
- Add docs
existedinnettw
Metadata
Metadata
Assignees
Labels
apienhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers