Recursive maze solver
Try and engage the move constructor:

m.data.push_back(temp);


Because temp is a named variable it will hit the version that uses const&amp; T. To try and get the alternative version that engages the move constructor add std::move

m.data.push_back(std::move(temp));


The input operator does not make any attempt to make sure each line is the same size.

size_t x_dim() { return data[0].size(); }


So the above may not be accurate.
You can add a fake set of cells at the top/bottom/left/right of type 'WALL' then you don't need the test if (x &lt; 0 || y &lt; 0 || x &gt;= m.x_dim() || y &gt;= m.y_dim()) as it can never reach outside the bounds of the maze (this can be forced to be true because it is part of the code and not part of the user input). This means you don't need y_dim() as that is the only use case.

My main issue is that solve() actually mutates the maze object. Some form of visitor pattern may be a more re-usable technique, or solve() would be better as a member of maze().