Skip to content

Commit

Permalink
Check for compliance with output_iterator in function_output_iterator…
Browse files Browse the repository at this point in the history
…_test.
  • Loading branch information
Georgiy Guminov authored and Lastique committed Oct 10, 2024
1 parent e4eaeea commit 1ea8087
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/function_output_iterator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <boost/core/lightweight_test.hpp>
#include <boost/iterator/function_output_iterator.hpp>

#include <iterator>

namespace {

struct sum_func
Expand Down Expand Up @@ -57,5 +59,11 @@ int main()
}
#endif

#if defined(__cpp_lib_concepts) && ( __cpp_lib_concepts >= 202002L )

static_assert(std::output_iterator<decltype(boost::function_output_iterator([](int p) { })), int>);

#endif

return boost::report_errors();
}

0 comments on commit 1ea8087

Please sign in to comment.