Skip to content

Commit

Permalink
Fix for C++ compilers without C++11
Browse files Browse the repository at this point in the history
  • Loading branch information
okeuday committed Apr 14, 2020
1 parent 83da756 commit 74dd7d6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ template <typename T> struct default_delete {
void operator()(T &ptr) const { delete ptr; }
};

template <typename T, typename Deleter = deleter<void, void *, &::free>>
template <typename T, typename Deleter = deleter<void, void *, &::free> >
class handle {
struct dummy;
T _val;
Expand Down Expand Up @@ -1262,7 +1262,7 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libbfd>
bool _bfd_loaded;

typedef details::handle<bfd *,
details::deleter<bfd_boolean, bfd *, &bfd_close>>
details::deleter<bfd_boolean, bfd *, &bfd_close> >
bfd_handle_t;

typedef details::handle<asymbol **> bfd_symtab_t;
Expand Down Expand Up @@ -1636,9 +1636,9 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libdw>
}

private:
typedef details::handle<Dwfl *, details::deleter<void, Dwfl *, &dwfl_end>>
typedef details::handle<Dwfl *, details::deleter<void, Dwfl *, &dwfl_end> >
dwfl_handle_t;
details::handle<Dwfl_Callbacks *, details::default_delete<Dwfl_Callbacks *>>
details::handle<Dwfl_Callbacks *, details::default_delete<Dwfl_Callbacks *> >
_dwfl_cb;
dwfl_handle_t _dwfl_handle;
bool _dwfl_handle_initialized;
Expand Down Expand Up @@ -1962,14 +1962,14 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libdwarf>
private:
bool _dwarf_loaded;

typedef details::handle<int, details::deleter<int, int, &::close>>
typedef details::handle<int, details::deleter<int, int, &::close> >
dwarf_file_t;

typedef details::handle<Elf *, details::deleter<int, Elf *, &elf_end>>
typedef details::handle<Elf *, details::deleter<int, Elf *, &elf_end> >
dwarf_elf_t;

typedef details::handle<Dwarf_Debug,
details::deleter<int, Dwarf_Debug, &close_dwarf>>
details::deleter<int, Dwarf_Debug, &close_dwarf> >
dwarf_handle_t;

typedef std::map<Dwarf_Addr, int> die_linemap_t;
Expand Down Expand Up @@ -3403,7 +3403,7 @@ class TraceResolver : public TraceResolverImpl<system_tag::current_tag> {};

class SourceFile {
public:
typedef std::vector<std::pair<unsigned, std::string>> lines_t;
typedef std::vector<std::pair<unsigned, std::string> > lines_t;

SourceFile() {}
SourceFile(const std::string &path) {
Expand Down Expand Up @@ -3514,7 +3514,7 @@ class SourceFile {
#endif

private:
details::handle<std::ifstream *, details::default_delete<std::ifstream *>>
details::handle<std::ifstream *, details::default_delete<std::ifstream *> >
_file;

std::vector<std::string> get_paths_from_env_variable_impl() {
Expand Down

0 comments on commit 74dd7d6

Please sign in to comment.