mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 05:43:59 -07:00
parent
ff8da9d246
commit
c07e4a8c01
333 changed files with 0 additions and 95037 deletions
|
@ -1,21 +0,0 @@
|
|||
// Test for concepts support. Not just the language feature; also headers.
|
||||
#include <iostream>
|
||||
#include <ranges>
|
||||
#include <vector>
|
||||
|
||||
|
||||
template<typename T>
|
||||
concept Foo = std::ranges::input_range<T>;
|
||||
|
||||
|
||||
template<Foo F> auto foo(F const &r)
|
||||
{
|
||||
return std::distance(std::begin(r), std::end(r));
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
std::vector<int> const v{1, 2, 3};
|
||||
std::cout << foo(v) << '\n';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue