# std::chars_format

> C++ Atlas: `cppatlas.com/w/cpp/utility/chars_format` | Source: https://en.cppreference.com/w/cpp/utility/chars_format | Domain: Utility | Standards: C++17

A BitmaskType used to specify floating-point formatting for std::to_chars and std::from_chars.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <charconv>

enum class chars_format {
    scientific = /*unspecified*/,
    fixed      = /*unspecified*/,
    hex        = /*unspecified*/,
    general    = fixed | scientific
}; // (since C++17)
```

A *BitmaskType* used to specify floating-point formatting for `std::to_chars` and `std::from_chars`.

### Notes

| Feature-test macro | Value | Std | Feature |
| --- | --- | --- | --- |
| `__cpp_lib_to_chars` | `201611L` | (C++17) | Elementary string conversions (`std::to_chars`, `std::from_chars`) |

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`to_chars`](https://en.cppreference.com/w/cpp/utility/to_chars) (C++17): converts an integer or floating-point value to a character sequence (function)
- [`from_chars`](https://en.cppreference.com/w/cpp/utility/from_chars) (C++17): converts a character sequence to an integer or floating-point value (function)

---
Attribution: content from https://en.cppreference.com/w/cpp/utility/chars_format (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.