Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jun 4, 2024
1 parent 31643d0 commit 67d378c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/datamodel_syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ bool same = (energyType == cluster); // <-- true (comparisons work as expected)
bool isCluster = energyType.isA<ExampleCluster>(); // <-- true
bool isHit = energyType.isA<ExampleHit>(); // <-- false
auto newCluster = energyType.getValue<ExampleCluster>(); // <-- "cast back" to original type
auto newCluster = energyType.as<ExampleCluster>(); // <-- "cast back" to original type
// "Casting" only works if the types match. Otherwise there will be an exception
auto newHit = energyType.getValue<ExampleHit>(); // <-- exception
auto newHit = energyType.as<ExampleHit>(); // <-- exception
```

## Global options
Expand Down

0 comments on commit 67d378c

Please sign in to comment.