Commits

rubenvb  committed b8ac4e7

Fix lambda's.

  • Participants
  • Parent commits 8bc7ac4

Comments (0)

Files changed (2)

File libAmbrosia/Include/Ambrosia/Error/error.h

 
 private:
     const std::string m_message;
-    const string_vector m_list;
+    string_vector m_list;
 };
 
 libambrosia_namespace_end

File libAmbrosia/Source/Ambrosia/Error/error.cpp

 #include "Ambrosia/typedefs.h"
 
 // C++ includes
+#include <algorithm>
 #include <iostream>
     using std::cerr;
 /* <string> */
     m_list( list.size() )
 {
     auto dest = m_list.begin();
-    for_each(list.begin(), list.end(), [&](const file& item) { *dest++ = item.first; });
+    std::for_each(list.begin(), list.end(), [=](const file& item) mutable
+                                            { *dest++ = item.first; });
 }
 
 error::~error()
-
+{   }
 
 void error::output_message() const
 {
     cerr << m_message;
+    if( !m_list.empty() )
+    {
+        std::for_each( m_list.begin(), m_list.end(),
+                       [](const string &item)
+                       {
+                           cerr << "\t" << item << "\n";
+                       } );
+    }
 }
 
 libambrosia_namespace_end