--- /dev/null
+#ifndef __NEST_CLOSURE_H__
+#define __NEST_CLOSURE_H__
+
+#include "nest/DomainID.h"
+#include "nest/Expr.h"
+
+namespace nest
+{
+
+class Closure
+{
+public:
+ template <typename... Args>
+ Closure(const DomainID &id, Args &&... indices) : _id{id}, _sub{std::forward<Args>(indices)...}
+ {
+ // DO NOTHING
+ }
+
+public:
+ operator Expr() const;
+
+public:
+ const DomainID &id(void) const { return _id; }
+ const expr::Subscript &sub(void) const { return _sub; }
+
+private:
+ DomainID const _id;
+ expr::Subscript const _sub;
+};
+
+} // namespace nest
+
+#endif // __NEST_CLOSURE_H__
--- /dev/null
+#include "nest/Closure.h"
+
+#include <gtest/gtest.h>
+
+namespace
+{
+struct DummyNode final : public nest::expr::Node
+{
+};
+}
+
+TEST(Closure, ctor)
+{
+ nest::DomainID dom_id{0};
+ nest::Closure closure{dom_id, std::make_shared<DummyNode>()};
+
+ ASSERT_EQ(closure.id().value(), 0);
+ ASSERT_EQ(closure.sub().rank(), 1);
+}
+
+TEST(Closure, cast)
+{
+ nest::DomainID dom_id{0};
+ nest::Closure closure{dom_id, std::make_shared<DummyNode>()};
+
+ auto check = [](const nest::Expr &e) { ASSERT_NE(e.get(), nullptr); };
+
+ check(closure);
+}