大家,
我正在使用OpenFOAM,它自己创建了Foam :: string和Foam :: word类型:
(gdb) ptype Foam::word
type = class Foam::word : public Foam::string {
public:
static pointer typeName;
static int debug;
static const Foam::word null;
private:
void stripInvalid(void);
public:
word(void);
word(const Foam::word &);
word(pointer, bool);
word(pointer, size_type, bool);
word(const Foam::string &, bool);
word(const std::__cxx11::string &, bool);
word(Foam::Istream &);
static bool valid(char);
void operator=(const Foam::word &);
void operator=(const Foam::string &);
void operator=(const std::__cxx11::string &);
void operator=(pointer);
}
(gdb) ptype Foam::string
type = class Foam::string : public std::__cxx11::basic_string<char, std::char_traits<char>, …Run Code Online (Sandbox Code Playgroud) 大家.我正在调试一个严重模板类的类型不匹配的问题.我想在编译期间知道c ++类型信息,所以我写这个:
#pragma message typeinfo(var)
Run Code Online (Sandbox Code Playgroud)
它只是不起作用.
所以我在这里寻求帮助.我不确定是否有可能.但我认为编译器必须知道编译期间的类型信息.