我正在尝试将Google Test(gtest)代码移植到VxWorks 5.5.严重的缺点是开发环境Tornado 2.2使用古老的GCC编译器版本2.96.
在分析代码时,我找到了部分代码,gtest.h我不明白!这个C++模板类是如何运作的?
// ImplicitlyConvertible<From, To>::value is a compile-time bool
// constant that's true iff type From can be implicitly converted to
// type To.
template <typename From, typename To>
class ImplicitlyConvertible {
private:
// We need the following helper functions only for their types.
// They have no implementations.
// MakeFrom() is an expression whose type is From. We cannot simply
// use From(), as the type From may not have …Run Code Online (Sandbox Code Playgroud)