Code: Select all
../include/aos/filter: In constructor `basic_filter<I, O>::basic_filter() [with I = byte, O = wchar_t]':
deutf16.cc:4: instantiated from here
../include/aos/filter:64: error: no matching function for call to `input_obj<byte, basic_filter<byte, wchar_t> >::input_obj(void (basic_filter<byte, wchar_t>::*)(const byte&), basic_filter<byte, wchar_t>* const)'
../include/aos/input:21: note: candidates are: input_obj<byte, basic_filter<byte, wchar_t> >::input_obj(const input_obj<byte, basic_filter<byte, wchar_t> >&)
../include/aos/input:23: note: input_obj<I, C>::input_obj(void (C::*)(input_obj<I, C>*, const I&), C*) [with I = byte, C = basic_filter<byte, wchar_t>]
candy@blackbox:~/atlantisos/libaos$ gcc -v
Reading specs from /usr/lib/gcc/i486-slackware-linux/3.4.6/specs
Configured with: ../gcc-3.4.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.4.6
Code: Select all
template <typename I, class C>
class input_obj : public input_<I> {
public:
input_obj(void (C::*cb)(input_obj *, const I &), C * const obj) : callback(cb), c(obj) {}
As you can see, I'm passing this (which should be a plain pointer that gcc should copy on the stack imo) and gcc isn't reading the const that is behind the *, then to complain it isn't there.basic_filter::basic_filter() :
_input(new input_obj<I, basic_filter<I, O> >(&basic_filter<I, O>::basic_process, this)),
_output(new output_obj<O, basic_filter<I, O> >()) {}
Am I doing something wrong or is it not me?
Oh, add to that that the error only appears (and apparently is a problem) when I create a constructor in the subclass. The constructor is empty for practical purposes and doesn't explicitly call the parent constructor (same as a default constructor would).