Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/beman/any_view/detail/compressed_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class compressed_ptr<T> {
#if _MSC_VER
template <class MemberT, class BaseT>
requires std::derived_from<T, BaseT>
[[nodiscard]] constexpr const MemberT& operator->*(MemberT BaseT::*member_ptr) const noexcept {
[[nodiscard]] constexpr const MemberT& operator->*(MemberT BaseT::* member_ptr) const noexcept {
return value->*member_ptr;
}
#endif // _MSC_VER
Expand Down
12 changes: 6 additions & 6 deletions include/beman/any_view/detail/no_unique_address.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#define BEMAN_ANY_VIEW_DETAIL_NO_UNIQUE_ADDRESS_HPP

#ifndef BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS
#if _MSC_VER
#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
#else
#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[no_unique_address]]
#endif // _MSC_VER
#endif // BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS
#if _MSC_VER
#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
#else
#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[no_unique_address]]
#endif // _MSC_VER
#endif // BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS

#endif // BEMAN_ANY_VIEW_DETAIL_NO_UNIQUE_ADDRESS_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ template <class T, class U>
inline constexpr bool reference_converts_from_temporary_v = false;

#ifdef __has_builtin
#if __has_builtin(__reference_converts_from_temporary)
#if __has_builtin(__reference_converts_from_temporary)

template <class T, class U>
requires true
inline constexpr bool reference_converts_from_temporary_v<T, U> = __reference_converts_from_temporary(T, U);

#endif // __has_builtin(__reference_converts_from_temporary)
#endif // __has_builtin
#endif // __has_builtin(__reference_converts_from_temporary)
#endif // __has_builtin

} // namespace beman::any_view::detail

Expand Down
6 changes: 3 additions & 3 deletions tests/beman/any_view/sfinae.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ TEST(SfinaeTest, span) {

TEST(SfinaeTest, iota) {
#ifdef __has_builtin
#if __has_builtin(__reference_converts_from_temporary)
#if __has_builtin(__reference_converts_from_temporary)
// Prevention of dangling references requires C++23 compiler support
static_assert(not std::constructible_from<any_view<const int>, std::ranges::iota_view<int>>);
#endif // __has_builtin(__reference_converts_from_temporary)
#endif // __has_builtin
#endif // __has_builtin(__reference_converts_from_temporary)
#endif // __has_builtin
static_assert(std::constructible_from<any_view<int, random_access, int>, std::ranges::iota_view<int>>);
static_assert(
not std::constructible_from<any_view<int, input | approximately_sized, int>, std::ranges::iota_view<int>>);
Expand Down