Skip to content

Commit

Permalink
Remove shadow warnings (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
lackhole authored Feb 7, 2025
1 parent 85b3f93 commit 2703553
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/preview/__ranges/views/counted.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include "preview/__type_traits/detail/tag.h"
#include "preview/__type_traits/remove_cvref.h"

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif

namespace preview {
namespace ranges {
namespace views {
Expand Down Expand Up @@ -89,4 +94,8 @@ PREVIEW_INLINE_VARIABLE constexpr detail::counted_niebloid counted{};
} // namespace ranges
} // namespace preview

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif // PREVIEW_RANGES_VIEWS_COUNTED_H_
9 changes: 9 additions & 0 deletions include/preview/__ranges/views/drop_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#include "preview/__ranges/views/all.h"
#include "preview/__type_traits/conjunction.h"

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif

namespace preview {
namespace ranges {
namespace detail {
Expand Down Expand Up @@ -162,4 +167,8 @@ template<typename T>
PREVIEW_SPECIALIZE_ENABLE_BORROWED_RANGE(preview::ranges::drop_view<T>)
= preview::ranges::enable_borrowed_range<T>;

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif // PREVIEW_RANGES_VIEWS_DROP_VIEW_H_
9 changes: 9 additions & 0 deletions include/preview/__ranges/views/take_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
#include "preview/__type_traits/remove_cvref.h"
#include "preview/__utility/cxx20_rel_ops.h"

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif

namespace preview {
namespace ranges {

Expand Down Expand Up @@ -297,4 +302,8 @@ template<typename T>
PREVIEW_SPECIALIZE_ENABLE_BORROWED_RANGE(preview::ranges::take_view<T>)
= preview::ranges::enable_borrowed_range<T>;

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif // PREVIEW_RANGES_VIEWS_TAKE_VIEW_H_

0 comments on commit 2703553

Please sign in to comment.