Explicitly qualify specializations of elfutils::to_string
I attempted to build the "dwarflint" branch with gcc 7.3.1 , but ran
into various problems of the form:
c++/known.cc:220:1: error: explicit specialization of ‘template<class type> std::__cxx11::string elfutils::to_string(const type&)’ outside its namespace must use a nested-name-specifier [-fpermissive]
to_string<dwarf::dwarf_enum> (const dwarf::dwarf_enum &value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
The fix appears to be trivial.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index e6e7f3b..9696d4d 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,16 @@
+2018-02-26 David Malcolm <dmalcolm@redhat.com>
+
+ * c++/edit-values.cc (to_string<dwarf_edit::attribute>):
+ Explicitly qualify with "elfutils::".
+ * c++/known.cc (to_string<dwarf::dwarf_enum>): Likewise.
+ (to_string<dwarf_data::dwarf_enum>): Likewise.
+ * c++/output-values.cc (to_string<dwarf_output::attribute>):
+ Likewise.
+ * c++/values.cc (to_string<dwarf::attribute>): Likewise.
+ (to_string<dwarf::attr_value>): Likewise.
+ (to_string<dwarf_edit::attr_value>): Likewise.
+ (to_string<dwarf_output::attr_value>): Likewise.
+
2017-10-03 Mark Wielaard <mark@klomp.org>
* libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
diff --git a/libdw/c++/edit-values.cc b/libdw/c++/edit-values.cc
index aefb5fd..ca83a96 100644
--- a/libdw/c++/edit-values.cc
+++ b/libdw/c++/edit-values.cc
@@ -41,7 +41,7 @@
template<>
std::string
-to_string<dwarf_edit::attribute> (const dwarf_edit::attribute &attr)
+elfutils::to_string<dwarf_edit::attribute> (const dwarf_edit::attribute &attr)
{
return attribute_string (attr);
}
diff --git a/libdw/c++/known.cc b/libdw/c++/known.cc
index bd84f52..cb5fe69 100644
--- a/libdw/c++/known.cc
+++ b/libdw/c++/known.cc
@@ -217,14 +217,14 @@
template<>
string
-to_string<dwarf::dwarf_enum> (const dwarf::dwarf_enum &value)
+elfutils::to_string<dwarf::dwarf_enum> (const dwarf::dwarf_enum &value)
{
return enum_string (value);
}
template<>
string
-to_string<dwarf_data::dwarf_enum> (const dwarf_data::dwarf_enum &value)
+elfutils::to_string<dwarf_data::dwarf_enum> (const dwarf_data::dwarf_enum &value)
{
return enum_string (value);
}
diff --git a/libdw/c++/output-values.cc b/libdw/c++/output-values.cc
index 199c72b..60abc0b 100644
--- a/libdw/c++/output-values.cc
+++ b/libdw/c++/output-values.cc
@@ -46,7 +46,7 @@
template<>
std::string
-to_string<dwarf_output::attribute> (const dwarf_output::attribute &attr)
+elfutils::to_string<dwarf_output::attribute> (const dwarf_output::attribute &attr)
{
return attribute_string (attr);
}
diff --git a/libdw/c++/values.cc b/libdw/c++/values.cc
index 335074f..c70d793 100644
--- a/libdw/c++/values.cc
+++ b/libdw/c++/values.cc
@@ -227,28 +227,28 @@
template<>
string
-to_string<dwarf::attribute> (const dwarf::attribute &attr)
+elfutils::to_string<dwarf::attribute> (const dwarf::attribute &attr)
{
return attribute_string (attr);
}
template<>
string
-to_string<dwarf::attr_value> (const dwarf::attr_value &value)
+elfutils::to_string<dwarf::attr_value> (const dwarf::attr_value &value)
{
return value_string (value);
}
template<>
string
-to_string<dwarf_edit::attr_value> (const dwarf_edit::attr_value &value)
+elfutils::to_string<dwarf_edit::attr_value> (const dwarf_edit::attr_value &value)
{
return value_string (value);
}
template<>
string
-to_string<dwarf_output::attr_value> (const dwarf_output::attr_value &value)
+elfutils::to_string<dwarf_output::attr_value> (const dwarf_output::attr_value &value)
{
return value_string (value);
}