File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
libcxx/test/std/ranges/range.adaptors/range.as.const Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,14 @@ static_assert(std::is_constructible_v<std::ranges::as_const_view<NonDefaultConst
3737static_assert (std::is_nothrow_constructible_v<std::ranges::as_const_view<DefaultConstructibleView>>);
3838
3939template <class T , class ... Args>
40- concept IsImplicitlyConstructible = requires (T val , Args... args) { val = {std::forward<Args>(args)...}; };
40+ concept IsImplicitlyConstructible = requires (void (&fun)(T) , Args&& ... args) { fun ( {std::forward<Args>(args)...}) ; };
4141
4242static_assert (IsImplicitlyConstructible<std::ranges::as_const_view<DefaultConstructibleView>>);
4343static_assert (!IsImplicitlyConstructible<std::ranges::as_const_view<NonDefaultConstructibleView>, int >);
4444
45+ static_assert (std::is_constructible_v<std::ranges::as_const_view<DefaultConstructibleView>>, DefaultConstructibleView);
46+ static_assert (!std::is_convertible_v<DefaultConstructibleView, std::ranges::as_const_view<DefaultConstructibleView>>);
47+
4548constexpr bool test () {
4649 std::ranges::as_const_view<DefaultConstructibleView> view = {};
4750 assert (view.base ().i_ == 23 );
You can’t perform that action at this time.
0 commit comments