我想检查现有的 Firebird (2.5.1) 数据库而无需安装服务器。
是否有任何工具可以检查数据库文件?
如果不是:我可以在实际运行数据库服务器的系统上运行任何工具来查看它吗?
我目前正在尝试实现一个小模板,该模板推导出存储一定数量的位作为模板参数所需的类型:
template<unsigned char BITS>
class Register
{
public:
unsigned long type;
};
Run Code Online (Sandbox Code Playgroud)
此外,我正在尝试将此模板专门用于某些位大小:
template<>
class Register<8>
{
public:
unsigned char type;
};
template<>
class Register<16>
{
public:
unsigned short type;
};
template<unsigned int N> Register<N+1>;
Run Code Online (Sandbox Code Playgroud)
不幸的是,这不能按预期工作,无法编译:
int _tmain(int argc, _TCHAR* argv[])
{
Register<32>::type val32 = 0xDEADBEEF;
assert(sizeof(val) == sizeof(unsigned long) );
Register<16>::valType val16 = 0xBEEF;
assert(sizeof(val) == sizeof(unsigned short) );
Register<8>::valType val8 = 0xEF;
assert(sizeof(val) == sizeof(unsigned char) );
Register<4>::valType val4 = 0xF;
assert(sizeof(val) == sizeof(unsigned char) );
return 0; …Run Code Online (Sandbox Code Playgroud)