title: Error: use of deleted function std::basic_ofstream (OpenCV and C++11)
body: <p>I'm trying to import a project that I wrote some time ago under Windows using C++11 and OpenCV but it is giving me troubles and I can't figure out why. It is a MakeFile project and I added a line to enable C++11 support. However, when I'm trying to run "make" or run the project in eclipse I receive the following error (and a few others)</p>
  
  <pre><code>use of deleted function ‘std::basic_filebuf&lt;char&gt;&amp;  std::basic_filebuf&lt;char&gt;::operator=(const std::basic_filebuf&lt;char&gt;&amp;)’   FacadeLabelingV2        line 599, external location: /usr/include/c++/4.8/fstream
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>#ifndef _FILEUTIL_CPP_
  #define _FILEUTIL_CPP_
  
  #include "Configuration.h"
  #include "Utilities.cpp"
  
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  
  static void saveFeatures(const std::pair&lt;cv::Mat, cv::Mat&gt;&amp; features, const Configuration&amp; config, bool training, bool append, int counter = 0){
      string prefix;
      if (training) {
          prefix = "train";
      } else {
          prefix = "test";
      }
      std::string directory = config.dir_classifiers + config.name_of_run;
      std::ofstream save_file;
      std::string counter_appendix = std::to_string(counter / 50);
      std::string path_temp = directory + prefix + "_features" + counter_appendix + ".txt";
      if (append){
          save_file = std::ofstream(path_temp, std::fstream::app);
  ...
  </code></pre>
  
  <p>I think it could be a problem with OpenCV not using C++11, is that possible? How could I fix that? I'm pretty sure this code was working on my windows machine without any problems.</p>
  
  <p>Thank you very much!</p>