Skip to content

Commit

Permalink
Oops, accidentally deleted config test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed May 13, 2021
1 parent 5607fbd commit 912d73c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config-tests/concepts.cxx
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';
}

0 comments on commit 912d73c

Please sign in to comment.