forked from jtv/libpqxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oops, accidentally deleted config test.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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'; | ||
} |