We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc 6 just implemented concepts lite, perhaps we could extend tpie to use them for pipelining, here is an example of how they work.
#include <type_traits> #include <utility> class node {}; template <typename T> concept bool pipenode() { return std::is_base_of<node, T>::value; } template <typename T> concept bool movable() { return requires(T i, T x) { {x = std::move(i)} {new T(std::move(i))} }; } template <typename T> concept bool pushable_generic() { return requires (T t, typename T::item_type i) { {t.push(i)} -> void }; } template <typename T> concept bool pushable_generic_node = pushable_generic<T>() && pipenode<T>() && movable<T>(); struct Monkey : public node{ Monkey() {} //Monkey(Monkey && m) = delete; typedef int item_type; void push(int) {} }; template <pushable_generic_node T> void hat(T node) { } int main() { hat(Monkey()); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
gcc 6 just implemented concepts lite, perhaps we could extend tpie to use them for pipelining, here is an example of how they work.
The text was updated successfully, but these errors were encountered: