Currently learning about lazy evalutation using expression templates, I wrote a small program to test it out. It runs fine when compiling without optimizations, but crashes with optimizations enabled.
Here's a link to the code where you can run it with and without optimizations.
It seems to crash when calling const value_t operator()(size_t i, size_t j) const
in the matrix
class. From what I've seen, the m_values
vector is somehow not initialized (m_values.size()
returns a random number right before the crash).
What's causing this?
Aucun commentaire:
Enregistrer un commentaire