* [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string
@ 2018-02-23 14:54 David Malcolm
2018-02-23 16:47 ` Djordje Todorovic
0 siblings, 1 reply; 4+ messages in thread
From: David Malcolm @ 2018-02-23 14:54 UTC (permalink / raw)
To: elfutils-devel; +Cc: David Malcolm
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.
libdw/ChangeLog:
* 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.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
libdw/c++/edit-values.cc | 2 +-
libdw/c++/known.cc | 4 ++--
libdw/c++/output-values.cc | 2 +-
libdw/c++/values.cc | 8 ++++----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libdw/c++/edit-values.cc b/libdw/c++/edit-values.cc
index aefb5fd1..ca83a967 100644
--- a/libdw/c++/edit-values.cc
+++ b/libdw/c++/edit-values.cc
@@ -41,7 +41,7 @@ template class dwarf_data::value<dwarf_edit>;
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 bd84f52c..cb5fe693 100644
--- a/libdw/c++/known.cc
+++ b/libdw/c++/known.cc
@@ -217,14 +217,14 @@ enum_string (const value_type &value)
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 199c72bd..60abc0b5 100644
--- a/libdw/c++/output-values.cc
+++ b/libdw/c++/output-values.cc
@@ -46,7 +46,7 @@ template class dwarf_output::copier<dwarf_edit>;
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 335074fb..c70d793f 100644
--- a/libdw/c++/values.cc
+++ b/libdw/c++/values.cc
@@ -227,28 +227,28 @@ value_string (const value_type &value)
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);
}
--
2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string
2018-02-23 14:54 [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string David Malcolm
@ 2018-02-23 16:47 ` Djordje Todorovic
2018-02-23 16:54 ` Djordje Todorovic
0 siblings, 1 reply; 4+ messages in thread
From: Djordje Todorovic @ 2018-02-23 16:47 UTC (permalink / raw)
To: elfutils-devel
Hi David,
This looks good to me, but Mark or someone else must approve.
Thanks,
Djordje
On 23.02.2018. 15:54, David Malcolm wrote:
> 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.
>
> libdw/ChangeLog:
> * 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.
>
> Signed-off-by: David Malcolm <dmalcolm@redhat.com>
> ---
> libdw/c++/edit-values.cc | 2 +-
> libdw/c++/known.cc | 4 ++--
> libdw/c++/output-values.cc | 2 +-
> libdw/c++/values.cc | 8 ++++----
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/libdw/c++/edit-values.cc b/libdw/c++/edit-values.cc
> index aefb5fd1..ca83a967 100644
> --- a/libdw/c++/edit-values.cc
> +++ b/libdw/c++/edit-values.cc
> @@ -41,7 +41,7 @@ template class dwarf_data::value<dwarf_edit>;
>
> 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 bd84f52c..cb5fe693 100644
> --- a/libdw/c++/known.cc
> +++ b/libdw/c++/known.cc
> @@ -217,14 +217,14 @@ enum_string (const value_type &value)
>
> 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 199c72bd..60abc0b5 100644
> --- a/libdw/c++/output-values.cc
> +++ b/libdw/c++/output-values.cc
> @@ -46,7 +46,7 @@ template class dwarf_output::copier<dwarf_edit>;
>
> 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 335074fb..c70d793f 100644
> --- a/libdw/c++/values.cc
> +++ b/libdw/c++/values.cc
> @@ -227,28 +227,28 @@ value_string (const value_type &value)
>
> 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);
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string
2018-02-23 16:47 ` Djordje Todorovic
@ 2018-02-23 16:54 ` Djordje Todorovic
2018-02-26 17:53 ` Mark Wielaard
0 siblings, 1 reply; 4+ messages in thread
From: Djordje Todorovic @ 2018-02-23 16:54 UTC (permalink / raw)
To: elfutils-devel; +Cc: David Malcolm
ccing David
On 23.02.2018. 17:47, Djordje Todorovic wrote:
> Hi David,
>
> This looks good to me, but Mark or someone else must approve.
>
> Thanks,
> Djordje
>
> On 23.02.2018. 15:54, David Malcolm wrote:
>> 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.
>>
>> libdw/ChangeLog:
>> * 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.
>>
>> Signed-off-by: David Malcolm <dmalcolm@redhat.com>
>> ---
>> libdw/c++/edit-values.cc | 2 +-
>> libdw/c++/known.cc | 4 ++--
>> libdw/c++/output-values.cc | 2 +-
>> libdw/c++/values.cc | 8 ++++----
>> 4 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/libdw/c++/edit-values.cc b/libdw/c++/edit-values.cc
>> index aefb5fd1..ca83a967 100644
>> --- a/libdw/c++/edit-values.cc
>> +++ b/libdw/c++/edit-values.cc
>> @@ -41,7 +41,7 @@ template class dwarf_data::value<dwarf_edit>;
>>
>> 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 bd84f52c..cb5fe693 100644
>> --- a/libdw/c++/known.cc
>> +++ b/libdw/c++/known.cc
>> @@ -217,14 +217,14 @@ enum_string (const value_type &value)
>>
>> 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 199c72bd..60abc0b5 100644
>> --- a/libdw/c++/output-values.cc
>> +++ b/libdw/c++/output-values.cc
>> @@ -46,7 +46,7 @@ template class dwarf_output::copier<dwarf_edit>;
>>
>> 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 335074fb..c70d793f 100644
>> --- a/libdw/c++/values.cc
>> +++ b/libdw/c++/values.cc
>> @@ -227,28 +227,28 @@ value_string (const value_type &value)
>>
>> 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);
>> }
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string
2018-02-23 16:54 ` Djordje Todorovic
@ 2018-02-26 17:53 ` Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2018-02-26 17:53 UTC (permalink / raw)
To: Djordje Todorovic; +Cc: elfutils-devel, David Malcolm
On 23.02.2018. 17:47, Djordje Todorovic wrote:
> This looks good to me, but Mark or someone else must approve.
Looks good to me to. Thanks.
Pushed to dwarflint branch.
Cheers,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-26 17:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 14:54 [PATCH, dwarflint] Explicitly qualify specializations of elfutils::to_string David Malcolm
2018-02-23 16:47 ` Djordje Todorovic
2018-02-23 16:54 ` Djordje Todorovic
2018-02-26 17:53 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).