Skip to content

Commit 42e776b

Browse files
authored
updates README.md
1 parent ea0bf00 commit 42e776b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ Below is a tree diagram showing the content of the expression_tree that was crea
3737

3838
## Creating Expression Trees
3939

40-
The `expression_tree` class is a templated, RAII container class that takes ownership of user-defined expressions. The template parameter of `expression_tree` is the type of object that the `expression_tree` can evaluate. Assuming there is a user-defined class named `my_type` to be evaluated, the templated `expression_tree` type would look like this: `expression_tree<my_type>`. The template parameter of `expression_tree` cannot be a primitive type, like `int`, `char`, or `double`.
40+
The `expression_tree` class is a templated, RAII container class that takes ownership of user-defined expressions. The template parameter of `expression_tree` is the type of object that the `expression_tree` can evaluate. Assuming there is a user-defined class named `my_type`, the templated `expression_tree` type would look like this: `expression_tree<my_type>`. The template argument of `expression_tree` cannot be a primitive type, like `int`, `char`, or `double`.
4141

4242
An `expression_tree` cannot be default constructed - it must be initialized with an expression. Users can easily and intuitively define expressions using one of the `make_expr` helper functions found in the namespace `attwoodn::expression_tree`. `make_expr` generates heap-allocated pointers to expression tree nodes and returns them. As such, the returned expression tree node pointers should be managed carefully. If the returned pointers are not wrapped in an `expression_tree` or a smart pointer, they will need to be explicitly `delete`d by the calling code.
4343

44+
// TODO document the thre make_expr functions
45+
4446
Here are some examples of how you might handle the return value from one of the `make_expr` helper functions:
4547
```cpp
4648
#include <attwoodn/expression_tree.hpp>

0 commit comments

Comments
 (0)