You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ Since this is a header-only library, the build step is only really for building
97
97
#### Installation and Linking
98
98
First, use CMake's install step to install the project (e.g. `cmake --build . --target install`).
99
99
From the `cmake` directory, copy the `FindLB` directory to a place in your [`CMAKE_MODULE_PATH`](https://cmake.org/cmake/help/latest/variable/CMAKE_MODULE_PATH.html).
100
-
Then, add `find_package(LB/utf REQUIRED)` to your CMake script.
100
+
Then, add `find_package(LB/utf 1 EXACT REQUIRED)` to your CMake script.
101
101
You may need to set the CMake variable `LB/utf_ROOT` if you installed to a nonstandard location.
102
102
Finally, link to the `LB::utf` imported target with [`target_link_libraries()`](https://cmake.org/cmake/help/latest/command/target_link_libraries.html).
The operations `cp` must support are those shown in the `noexcept` specification.
132
132
If the sequence is invalid, the function returns the original value of `it` and `0`, and the value of `cp` is undefined.
133
133
134
+
See `example/num_code_points.cpp` for example usage.
135
+
134
136
#### `min_code_units`
135
137
Calculates the minimum number of code units required to store a code point.
136
138
```cpp
@@ -153,3 +155,5 @@ auto encode_code_point(code_point_t cp)
153
155
`code_unit_t` must be an integral type.
154
156
`code_point_t` must be an unsigned integral type, or and unsigned-integer-like type that must support , `operator==(unsigned)`, `operator>>=(std::size_t)`, `operator&(unsigned)`, must be convertible to `code_unit_t`, and must be able to be passed to `min_code_units`.
155
157
This function does not have any `noexcept` specification because `std::basic_string` does not - the memory allocation could throw an exception.
0 commit comments