8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81b896e commit afd02ccCopy full SHA for afd02cc
src/Datalog.h
@@ -43,6 +43,11 @@ struct Symbol : optional<T>
43
}
44
};
45
46
+template<typename T>
47
+shared_ptr<Symbol<T>> symbol() {
48
+ return make_shared<Symbol<T>>();
49
+}
50
+
51
template <typename T>
52
struct SymbolOrValue : public variant<T, shared_ptr<Symbol<T>>>
53
{
tests/types_test.cpp
@@ -49,9 +49,10 @@ int main()
- auto x = make_shared<Symbol<string>>();
- auto y = make_shared<Symbol<string>>();
54
- auto z = make_shared<Symbol<string>>();
+ auto x = symbol<string>();
+ auto y = symbol<string>();
+ auto z = symbol<string>();
55
56
// Rule1
57
Adviser::Atom clause1{{x}, {y}};
58
auto rule11 = Rule<AcademicAncestor, Adviser>{
0 commit comments