Skip to content

Commit dd2ff64

Browse files
committed
More urlchecker::url_check()
1 parent 3473063 commit dd2ff64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vignettes/cpp11.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ f("x"_nm = "y", "value"_nm = 1);
510510
All R objects have attributes, which can be queried and modified with `.attr()`.
511511
cpp11 also provides `.names()` as an alias for the `names` attribute.
512512
The following code snippet illustrates these methods.
513-
Note the use of `{}` [initializer list](https://en.cppreference.com/w/cpp.html/utility/initializer_list) syntax.
513+
Note the use of `{}` [initializer list](https://en.cppreference.com/w/cpp/utility/initializer_list.html) syntax.
514514
This allows you to create an R vector from C++ scalar values:
515515

516516
```{r attribs, engine = "cpp11"}
@@ -736,7 +736,7 @@ local({
736736
### Algorithms
737737

738738
The `<algorithm>` header provides a large number of algorithms that work with iterators.
739-
A good reference is available at <https://en.cppreference.com/w/cpp.html/algorithm>.
739+
A good reference is available at <https://en.cppreference.com/w/cpp/algorithm.html>.
740740
For example, we could write a basic cpp11 version of `findInterval()` that takes two arguments, a vector of values and a vector of breaks, and locates the bin that each x falls into.
741741
This shows off a few more advanced iterator features.
742742
Read the code below and see if you can figure out how it works.
@@ -790,7 +790,7 @@ The most important of these data structures are the `vector`, the `unordered_set
790790
We'll focus on these three in this section, but using the others is similar: they just have different performance trade-offs.
791791
For example, the `deque` (pronounced "deck") has a very similar interface to vectors but a different underlying implementation that has different performance trade-offs.
792792
You may want to try it for your problem.
793-
A good reference for STL data structures is <https://en.cppreference.com/w/cpp.html/container> --- I recommend you keep it open while working with the STL.
793+
A good reference for STL data structures is <https://en.cppreference.com/w/cpp/container.html> --- I recommend you keep it open while working with the STL.
794794

795795
cpp11 knows how to convert from many STL data structures to their R equivalents, so you can return them from your functions without explicitly converting to R data structures.
796796

@@ -843,7 +843,7 @@ list rle_cpp(doubles x) {
843843
(An alternative implementation would be to replace `i` with the iterator `lengths.rbegin()` which always points to the last element of the vector.
844844
You might want to try implementing that.)
845845

846-
Other methods of a vector are described at <https://en.cppreference.com/w/cpp.html/container/vector>.
846+
Other methods of a vector are described at <https://en.cppreference.com/w/cpp/container/vector.html>.
847847

848848
### Sets
849849

@@ -854,7 +854,7 @@ Unordered sets can somtimes be much faster (because they use a hash table intern
854854
Often even if you need an ordered set, you could consider using an unordered set and then sorting the output.
855855
Benchmarking with your expected dataset is the best way to determine which is fastest for your data.
856856
Like vectors, sets are templated, so you need to request the appropriate type of set for your purpose: `unordered_set<int>`, `unordered_set<bool>`, etc.
857-
More details are available at <https://en.cppreference.com/w/cpp.html/container/set> and <https://en.cppreference.com/w/cpp.html/container/unordered_set>.
857+
More details are available at <https://en.cppreference.com/w/cpp/container/set.html> and <https://en.cppreference.com/w/cpp/container/unordered_set.html>.
858858

859859
The following function uses an unordered set to implement an equivalent to `duplicated()` for integer vectors.
860860
Note the use of `seen.insert(x[i]).second`.

0 commit comments

Comments
 (0)