@@ -45,18 +45,6 @@ constexpr struct {
4545} eval_rhs;
4646} // namespace _chroma_util
4747
48- struct unchecked_context {
49- template <typename F>
50- static auto operator()(F&& f) {
51- return [&]<typename... Ts>[[= unchecked_context{}]](Ts&&... args)
52- #ifndef __clang__
53- -> std::invoke_result_t<F, Ts...>
54- #endif
55- { return std::forward<F>(f)(std::forward<Ts>(args)...); };
56- }
57- };
58- constexpr unchecked_context unchecked{};
59-
6048template <typename... Ts>
6149struct assumed_colors {};
6250
@@ -95,9 +83,6 @@ consteval viability viability_of(std::meta::info fnc, std::meta::info type) {
9583 auto is_convertible = [&](std::meta::info r) { return is_convertible_type(r, type); };
9684
9785 for (auto annotation : annotations_of(fnc) | std::views::transform(std::meta::type_of)) {
98- if (annotation == ^^unchecked_context) {
99- return ignored;
100- }
10186 if (_chroma_util::is_specialization(annotation, ^^assumed_colors) and
10287 std::ranges::any_of(template_arguments_of(annotation), is_convertible)) {
10388 return accepted;
@@ -134,14 +119,6 @@ template <typename T>
134119struct callable_from : color<T> {
135120 constexpr explicit(false) callable_from(color<T> const&) {}
136121
137- constexpr explicit(false) callable_from(unchecked_context const&)
138- requires ignorable<T>
139- {}
140-
141- constexpr explicit(false) callable_from(unchecked_context const&)
142- requires(not ignorable<T>)
143- = delete ("unchecked access to unignorable color");
144-
145122 consteval explicit(false)
146123 callable_from(std::meta::access_context ctx = std::meta::access_context::current()) {
147124 if (viability_of(ctx.scope(), ^^T) == viability::rejected) {
@@ -164,8 +141,6 @@ struct callable_from : color<T> {
164141
165142template <typename T>
166143struct not_callable_from {
167- constexpr explicit(false) not_callable_from(unchecked_context) {}
168-
169144 consteval explicit(false)
170145 not_callable_from(std::meta::access_context ctx = std::meta::access_context::current()) {
171146 if (viability_of(ctx.scope(), ^^T) == viability::accepted) {
@@ -184,7 +159,5 @@ struct not_callable_from {
184159using chroma::assume_color;
185160using chroma::callable_from;
186161using chroma::not_callable_from;
187- using chroma::unchecked;
188162
189- #define $unchecked ::chroma::_chroma_util::eval_rhs->*[&][[= unchecked]]
190163#define $with(...) ::chroma::_chroma_util::eval_rhs->*[&][[= assume_color<__VA_ARGS__>]]
0 commit comments