Skip to content

Commit

Permalink
Merge pull request #45 from njoy/update/concept-anyview
Browse files Browse the repository at this point in the history
Adding range type concept check
  • Loading branch information
whaeck authored Oct 2, 2024
2 parents 2af40f9 + 7c0cba4 commit 636c097
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Release Notes—tools
Given here are some release notes for tools.

## [tools v0.5.0](https://github.com/njoy/tools/pull/xx)
Bug fixes:
- apply the ranges::range concept on the AnyView constructor taking a Container template as input (this fixes a rare compilation error encountered with the GitHub CI)

## [tools v0.4.0](https://github.com/njoy/tools/pull/44)
New features:
- added a partial implementation of the C++23 ranges standard: chunk_view, chunk_by_view, stride_view and repeat_view (LLVM implementations for these views were used as models for our C++17 based implementations)
Expand Down
3 changes: 2 additions & 1 deletion src/tools/views/AnyView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class AnyView :
*
* @param[in] container the container or range to be type erased
*/
template < typename Container >
template < typename Container,
typename = std::enable_if_t< njoy::tools::std20::ranges::range< Container > > >
constexpr AnyView( Container&& container ) :
AnyView( Iterator( container.begin() ), Iterator( container.end() ) ) {}

Expand Down

0 comments on commit 636c097

Please sign in to comment.