Skip to content

Commit

Permalink
improve (readme): remove unique_ptr and use auto
Browse files Browse the repository at this point in the history
  • Loading branch information
tbhaxor committed Jul 25, 2023
1 parent 32ef366 commit c886d56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ int main() {
Firefly::Vector v2(vec2);

// add two firefly vectors and
// returns unique_ptr of Firefly::Vector type
std::unique_ptr<Firefly::Vector> vec_addition = v1 + v2;
// returns Firefly::Vector type
auto vec_addition = v1 + v2;
// print out v1 on
std::cout << v1 << std::endl; // [1, 2, 3, 4]
std::cout << v2 << std::endl; // [2, 3, 4, 1]
std::cout << *vec_addition << std::endl; // [3, 5, 7, 5]
std::cout << vec_addition << std::endl; // [3, 5, 7, 5]
}
```

### Build directly from compiler

```console
Expand Down

0 comments on commit c886d56

Please sign in to comment.