Add assertion if nullptr is passed to parse function (#3593)
Addresses #3584
This commit is contained in:
1 parent
b185c5bc9d
commit
dbfd33a70a
5 files changed
+52
-4
No files matched your search
@@ -29,7 +29,7 @@ Unlike the [`parse`](parse.md) function, this function neither throws an excepti
|
||||
: A compatible input, for instance:
|
||||
|
||||
- an `std::istream` object
|
||||
- a `FILE` pointer
|
||||
- a `FILE` pointer (must not be null)
|
||||
- a C-style array of characters
|
||||
- a pointer to a null-terminated string of single byte characters
|
||||
- a `std::string`
|
||||
@@ -72,6 +72,11 @@ Linear in the length of the input. The parser is a predictive LL(1) parser.
|
||||
|
||||
(1) A UTF-8 byte order mark is silently ignored.
|
||||
|
||||
!!! danger "Runtime assertion"
|
||||
|
||||
The precondition that a passed `#!cpp FILE` pointer must not be null is enforced with a
|
||||
[runtime assertion](../../features/assertions.md).
|
||||
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
Reference in new issue
Block a user