So to use the returned value you must know that you passed only one sample. If you know this why don't you use the second version of the predict()? But Ok, it can be really useful to have one generic API of predict() like this one. Why do we need to have the second one (line 2026)? 
You made me think that the best solution is actually one predict method :) like in the line 2025 but with Input/Output arrays:
virtual float predict(InputArray predictors, OutputArray responses);
In this case predictedLabels is optional parameter. 
If you agree, please use Input/Output arrays in the API of other methods of your classes instead of matrices. Thanks for the hint!