Also - need curlies on multi-line if.  Also - the casting syntax is strange and non-obvious.  You should use the constructor syntax - which is what is really going on:

```c++
return Composition::Ptr(new Composition(tot_decay, decay_line_));
```