Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / xbt / backtrace.cpp
index 349ed11..693ef55 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2005-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -53,9 +53,6 @@ std::unique_ptr<char, std::function<void(char*)>> demangle(const char* name)
 class BacktraceImpl {
 #if HAVE_BOOST_STACKTRACE_BACKTRACE || HAVE_BOOST_STACKTRACE_ADDR2LINE
   const boost::stacktrace::stacktrace st = boost::stacktrace::stacktrace();
-#else
-  const char st[1] = ""; // fallback value
-#endif
 public:
   std::string resolve() const
   {
@@ -63,6 +60,10 @@ public:
     ss << st;
     return ss.str();
   }
+#else
+public:
+  std::string resolve() const { return ""; } // fallback value
+#endif
 };
 
 Backtrace::Backtrace() : impl_(std::make_shared<BacktraceImpl>()) {}