Skip to content

Commit

Permalink
Removed assertions since they generate compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Nov 1, 2023
1 parent 1a88c74 commit 6ca45d8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/tools/ranges/ViewBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define NJOY_TOOLS_RANGES_VIEWBASE

// system includes
#include <cassert>
#include <stdexcept>

// other includes
Expand Down Expand Up @@ -46,7 +45,6 @@ class ViewBase {
typename Range::iterator > = true >
constexpr decltype(auto) front() const noexcept {

assert( ( !this->empty(), "front(): view is empty" ) );
return *( this->derived().begin() );
}

Expand All @@ -58,7 +56,6 @@ class ViewBase {
typename Range::iterator > = true >
constexpr decltype(auto) back() const noexcept {

assert( ( !this->empty(), "back(): view is empty" ) );
return *( std::prev( this->derived().end() ) );
}

Expand Down

0 comments on commit 6ca45d8

Please sign in to comment.