diff --git a/backtrace.hpp b/backtrace.hpp index c34066b0..14c49276 100644 --- a/backtrace.hpp +++ b/backtrace.hpp @@ -32,8 +32,7 @@ namespace debug { public: backtrace (void); - const decltype(m_frames)& frames(void) const - { return m_frames; } + const auto& frames(void) const { return m_frames; } }; std::ostream& diff --git a/backtrace_execinfo.cpp b/backtrace_execinfo.cpp index c2343a42..33507925 100644 --- a/backtrace_execinfo.cpp +++ b/backtrace_execinfo.cpp @@ -72,7 +72,7 @@ addr2line (const void *addr) /////////////////////////////////////////////////////////////////////////////// std::ostream& debug::operator <<(std::ostream &os, const debug::backtrace &rhs) { - const auto frames = rhs.frames (); + auto const &frames = rhs.frames (); // We don't use the array form of unique_ptr as clang fails on ambigious constructors typedef std::unique_ptr str_t; diff --git a/test/iterator.cpp b/test/iterator.cpp index 9cf04eab..1da10359 100644 --- a/test/iterator.cpp +++ b/test/iterator.cpp @@ -22,7 +22,7 @@ main (int, char**) char c_char[] = { '\0', 'b', 'c' }; bool success = true; - for (auto [i, v, a, c]: util::izip (v_int, a_float, c_char)) { + for (auto const &[i, v, a, c]: util::izip (v_int, a_float, c_char)) { success = success && v_int[i] == v && util::equal (a_float[i], a) &&