-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prove concept usage for static objects
- Loading branch information
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
new-obj-model/include/jank/obj-model/tagged/associatively_readable.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <jank/obj-model/tagged/object.hpp> | ||
|
||
namespace jank::obj_model::tagged | ||
{ | ||
template <typename T> | ||
concept associatively_readable = requires(T * const t) | ||
{ | ||
{ t->get(object_ptr{}) } -> std::convertible_to<object_ptr>; | ||
{ t->get(object_ptr{}, object_ptr{}) } -> std::convertible_to<object_ptr>; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters