Am 24.06.2016 um 15:57 schrieb David Kastrup:
Knut Petersen <knut_peter...@t-online.de> writes:
Am 24.06.2016 um 15:13 schrieb David Kastrup:
At any rate, this implies that TRANSLATOR_INHERIT fails doing its job
when it has to inherit overloaded template functions with a single
"using" instruction. I propose the following patch (to current
master). Does it change something for you?
No:
In file included from /home/knut/sources/lily/lily/slur-engraver.cc:32:0:
/home/knut/sources/lily/lily/slur-engraver.cc: In static member function
'static void Slur_engraver::boot()':
/home/knut/sources/lily/lily/include/translator.icc:115:40: error:
'&Slur_proto_engraver::listen_slur' is not a valid template argument for type
'void (Translator::*)(Stream_event*)' because it is of type 'void
(Slur_proto_engraver::*)(Stream_event*)'
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/lily/include/translator.icc:115:40: error:
'&Slur_proto_engraver::listen_slur' is not a valid template argument for type
'void (Slur_engraver::*)(Stream_event*)' because it is of type 'void
(Slur_proto_engraver::*)(Stream_event*)'
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/lily/include/translator.icc:115:40: note: standard
conversions are not allowed in this context
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/stepmake/stepmake/c++-rules.make:4: recipe for target
'out/slur-engraver.o' failed
make[1]: *** [out/slur-engraver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/home/knut/sources/lily/lily/staff-performer.cc: In member function 'int
Staff_performer::get_channel(const string&)':
/home/knut/sources/lily/lily/staff-performer.cc:295:37: warning: conversion to 'int' from
'std::map<std::basic_string<char>, int>::size_type {aka long unsigned int}' may
alter its value [-Wconversion]
: channel_map.size ();
^
make[1]: Leaving directory '/home/knut/sources/lily/build/lily'
/home/knut/sources/lily/stepmake/stepmake/generic-targets.make:6: recipe for
target 'all' failed
make: *** [all] Error 2
Weird. What happens if you swap the adjacent lines
DECLARE_TRANSLATOR_CALLBACKS (NAME); \
TRANSLATOR_INHERIT (Translator); \
in lily/include/translator.hh ?
Not much ... I still get:
In file included from /home/knut/sources/lily/lily/slur-engraver.cc:32:0:
/home/knut/sources/lily/lily/slur-engraver.cc: In static member function
'static void Slur_engraver::boot()':
/home/knut/sources/lily/lily/include/translator.icc:115:40: error:
'&Slur_proto_engraver::listen_slur' is not a valid template argument for type
'void (Translator::*)(Stream_event*)' because it is of type 'void
(Slur_proto_engraver::*)(Stream_event*)'
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/lily/include/translator.icc:115:40: error:
'&Slur_proto_engraver::listen_slur' is not a valid template argument for type
'void (Slur_engraver::*)(Stream_event*)' because it is of type 'void
(Slur_proto_engraver::*)(Stream_event*)'
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/lily/include/translator.icc:115:40: note: standard
conversions are not allowed in this context
listen_finder<&cl::listen_ ## m> (), \
^
/home/knut/sources/lily/lily/slur-engraver.cc:65:3: note: in expansion of macro
'ADD_LISTENER'
ADD_LISTENER (Slur_engraver, slur);
^
/home/knut/sources/lily/lily/staff-performer.cc: In member function 'int
Staff_performer::get_channel(const string&)':
/home/knut/sources/lily/lily/staff-performer.cc:295:37: warning: conversion to 'int' from
'std::map<std::basic_string<char>, int>::size_type {aka long unsigned int}' may
alter its value [-Wconversion]
: channel_map.size ();
^
/home/knut/sources/lily/stepmake/stepmake/c++-rules.make:4: recipe for target
'out/slur-engraver.o' failed
make[1]: *** [out/slur-engraver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/knut/sources/lily/build/lily'
/home/knut/sources/lily/stepmake/stepmake/generic-targets.make:6: recipe for
target 'all' failed
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel