You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a type does not satisfy the above requirement, then a diagnostic like this is presented..
../../../test/unit/range/access/size.cpp:43:2: note: because 'cjdb::invocable<cjdb::ranges::detail_size::size_fn, std::array<int, 100> &>' evaluated to false
../../../test/include/cjdb/test/range/access.hpp:90:21: note: expanded from macro 'DEFINE_CHECK_FOR_MEMBER_ACCESS'
static_assert(cjdb::invocable<cjdb::ranges::CJDB_TEST_CONCAT(detail_, base_cpo)::CJDB_TEST_CONCAT(base_cpo, _fn), std::array<int, 100>&>); \
^
../../../include/cjdb/concepts/callable/invocable.hpp:19:3: note: because 'cjdb::invoke(std::forward<F>(f), std::forward<Args>(args)...)' would be invalid: no matching function for call to object of type 'const cjdb::detail_invoke::invoke_fn'
cjdb::invoke(std::forward<F>(f), std::forward<Args>(args)...); // not required to be equality-preserving
^
This isn't exactly informative, since all it's told me is what I already knew: that invoke couldn't be invoked. Something more informative would involve explaining why invoke was unavailable, such as when one tries to manually call cjdb::detail_size::size_fn{}(some_array).
../../../test/unit/range/access/size.cpp:66:8: error: call to object of type 'const cjdb::ranges::detail_size::size_fn' is ambiguous
(void)cjdb::ranges::size(x);
^~~~~~~~~~~~~~~~~~
../../../include/cjdb/detail/range/size.hpp:59:32: note: candidate function [with T = std::__1::array<int, 100> &]
[[nodiscard]] constexpr auto operator()(T&& t) const
^
../../../include/cjdb/detail/range/size.hpp:73:32: note: candidate function [with T = std::__1::array<int, 100> &]
[[nodiscard]] constexpr auto operator()(T&& t) const
^
../../../include/cjdb/detail/range/size.hpp:79:8: note: candidate function [with T = std::__1::array<int, 100> &] has been explicitly deleted
void operator()(T&&) const = delete;
^
I'd like to be able to add an attribute to expressions inside requires-expressions to indicate that the compiler should divulge why said expression failed.
The reason for wanting an attribute is because there might be some concepts where divulging information is TMI or perhaps it'll lead to template dump-like issues, etc.
The text was updated successfully, but these errors were encountered:
Motivation
Consider
If a type does not satisfy the above requirement, then a diagnostic like this is presented..
This isn't exactly informative, since all it's told me is what I already knew: that
invoke
couldn't be invoked. Something more informative would involve explaining whyinvoke
was unavailable, such as when one tries to manually callcjdb::detail_size::size_fn{}(some_array)
.I'd like to be able to add an attribute to expressions inside requires-expressions to indicate that the compiler should divulge why said expression failed.
The reason for wanting an attribute is because there might be some concepts where divulging information is TMI or perhaps it'll lead to template dump-like issues, etc.
The text was updated successfully, but these errors were encountered: