Skip to content

Commit 3473063

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

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# cpp11 0.5.1
1414

1515
* cpp11 now requires R >=4.0.0, in line with the
16-
[tidyverse version policy](https://www.tidyverse.org/blog/2019/04/r-version-support/) (#411).
16+
[tidyverse version policy](https://tidyverse.org/blog/2019/04/r-version-support/) (#411).
1717

1818
* Because cpp11 now requires R >=4.0.0, a number of previously optional tools
1919
are now always available, allowing us to remove some dead code. In

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LinkingTo: cpp11
1919
```
2020

2121
Then decorate C++ functions you want to expose to R with `[[cpp11::register]]`.
22-
*Note that this is a [C++11 attribute](https://en.cppreference.com/w/cpp/language/attributes), not a comment like is used in Rcpp.*
22+
*Note that this is a [C++11 attribute](https://en.cppreference.com/w/cpp/language/attributes.html), not a comment like is used in Rcpp.*
2323

2424
cpp11 is a header only library with no hard dependencies and does not use a shared library, so it is straightforward and reliable to use in packages without fear of compile-time and run-time mismatches.
2525

vignettes/FAQ.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ is_named(c(x = "foo"))
153153

154154
#### 7. How do I return a `cpp11::writable::logicals` object with only a `FALSE` value?
155155

156-
You need to use [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) with `{}` to create the object.
156+
You need to use [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization.html) with `{}` to create the object.
157157

158158
```{cpp11}
159159
#include <cpp11.hpp>

vignettes/cpp11.Rmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Typical bottlenecks that C++ can address include:
4545
The aim of this vignette is to discuss only those aspects of C++ and cpp11 that are absolutely necessary to help you eliminate bottlenecks in your code.
4646
We won't spend much time on advanced features like object-oriented programming or templates because the focus is on writing small, self-contained functions, not big programs.
4747
A working knowledge of C++ is helpful, but not essential.
48-
Many good tutorials and references are freely available, including <https://www.learncpp.com/> and <https://en.cppreference.com/w/cpp>.
48+
Many good tutorials and references are freely available, including <https://www.learncpp.com/> and <https://en.cppreference.com/w/cpp.html>.
4949
For more advanced topics, the *Effective C++* series by Scott Meyers is a popular choice.
5050

5151
### Outline
@@ -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/utility/initializer_list) syntax.
513+
Note the use of `{}` [initializer list](https://en.cppreference.com/w/cpp.html/utility/initializer_list) syntax.
514514
This allows you to create an R vector from C++ scalar values:
515515

516516
```{r attribs, engine = "cpp11"}
@@ -650,7 +650,7 @@ The standard template library (STL) provides a set of extremely useful data stru
650650
This section will explain some of the most important algorithms and data structures and point you in the right direction to learn more.
651651
I can't teach you everything you need to know about the STL, but hopefully the examples will show you the power of the STL, and persuade you that it's useful to learn more.
652652

653-
If you need an algorithm or data structure that isn't implemented in STL, one place to look is [boost](https://www.boost.org/doc/).
653+
If you need an algorithm or data structure that isn't implemented in STL, one place to look is [boost](https://www.boost.org/libraries/).
654654
Installing boost on your computer is beyond the scope of this vignette, but once you have it installed, you can use boost data structures and algorithms by including the appropriate header file with (e.g.) `#include <boost/array.hpp>`.
655655

656656
### Using iterators
@@ -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/algorithm>.
739+
A good reference is available at <https://en.cppreference.com/w/cpp.html/algorithm>.
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/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.html/container> --- 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/container/vector>.
846+
Other methods of a vector are described at <https://en.cppreference.com/w/cpp.html/container/vector>.
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/container/set> and <https://en.cppreference.com/w/cpp/container/unordered_set>.
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>.
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`.

vignettes/internals.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The various methods for both functions are defined in [cpp11/as.hpp](https://git
108108

109109
This is definitely the most complex part of the cpp11 code, with extensive use of [template metaprogramming](https://en.wikipedia.org/wiki/Template_metaprogramming).
110110
In particular the [substitution failure is not an error (SFINAE)](https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error) technique is used to control overloading of the functions.
111-
If we could use C++20 a lot of this code would be made simpler with [Concepts](https://en.cppreference.com/w/cpp/language/constraints), but alas.
111+
If we could use C++20 a lot of this code would be made simpler with [Concepts](https://en.cppreference.com/w/cpp/language/constraints.html), but alas.
112112

113113
The most common C++ types are included in the test suite and should work without issues, as more exotic types are used in real projects additional issues may arise.
114114

vignettes/motivations.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ Concretely cpp11 always uses `Rf_translateCharUTF8()` when obtaining `const char
339339
C++11 provides a host of new features to the C++ language.
340340
cpp11 uses a number of these including
341341

342-
- [move semantics](https://en.cppreference.com/w/cpp/language/move_constructor)
343-
- [type traits](https://en.cppreference.com/w/cpp/header/type_traits)
344-
- [initializer_list](https://en.cppreference.com/w/cpp/utility/initializer_list)
345-
- [variadic templates / parameter packs](https://en.cppreference.com/w/cpp/language/parameter_pack)
346-
- [user defined literals](https://en.cppreference.com/w/cpp/language/user_literal)
347-
- [user defined attributes](https://en.cppreference.com/w/cpp/language/attributes)
342+
- [move semantics](https://en.cppreference.com/w/cpp/language/move_constructor.html)
343+
- [type traits](https://en.cppreference.com/w/cpp/header/type_traits.html)
344+
- [initializer_list](https://en.cppreference.com/w/cpp/utility/initializer_list.html)
345+
- [variadic templates / parameter packs](https://en.cppreference.com/w/cpp/language/parameter_pack.html)
346+
- [user defined literals](https://en.cppreference.com/w/cpp/language/user_literal.html)
347+
- [user defined attributes](https://en.cppreference.com/w/cpp/language/attributes.html)
348348

349349
## Simpler implementation {#simpler-implementation}
350350

0 commit comments

Comments
 (0)