I'm deriving a new class from the VCL TStream
class:
// A stream based on a temporary file, deleted when the stream is closed
class TTempFileStream : public TStream
{
...
public:
using TStream::Seek;
__int64 __fastcall Seek(const __int64 Offset, TSeekOrigin Origin)
{
return 0; // for simplicity!
}
...
} ;
TStream
declares the following two variants of Seek:-
virtual int __fastcall Seek(int Offset, System::Word Origin)/* overload */;
virtual __int64 __fastcall Seek(const __int64 Offset, TSeekOrigin Origin)/* overload */;
But I get the following W8022 warning when compiling my class:-
[BCC32 Warning]_utils.h(166): W8022
'_fastcall TTempFileStream::Seek(const __int64,TSeekOrigin)' hides virtual function '_fastcall TStream::Seek(int,unsigned short)'
Surely the Using declaration should fix that?
To drag this question back on track, I'm aware of the way that the two versions of TStream::seek interrelate, and I'm just trying to get inherited Seek(int,int) method exposed by the derived class. Why isn't my using
declaration doing that?