basic, expairseq: use standard C++ RTTI in compare(), is_equal(), match(), etc.