mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 10:37:33 -07:00
Re-add...
This commit is contained in:
parent
e96515433d
commit
b1faebae4a
333 changed files with 95037 additions and 0 deletions
21
ext/libpqxx-7.7.3/config-tests/concepts.cxx
Normal file
21
ext/libpqxx-7.7.3/config-tests/concepts.cxx
Normal file
|
@ -0,0 +1,21 @@
|
|||
// 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