誰かが私のために次のコードスニペットを説明できますか?
// Bind base object so we can compute offsets
// currently only implemented for indexes.
template<class DataObj> void BindAsBase(DataObj &rowbuf)
{
// Attempting to assign working_type first guarantees exception safety.
working_type = DTL_TYPEID_NAME (rowbuf);
working_addr = reinterpret_cast<BYTE*>(&rowbuf);
working_size = sizeof(rowbuf);
}
私の問題は、sizeof(rowbuf)の結果は何ですか?それはDataObjの長さですか、それともByte *の長さですか?なぜ?
別の質問:ポインタのオフセットを計算する必要があるのはなぜですか?それの通常の使用法は何ですか?
sizeof(working_addr)は何に等しいですか?