以下情况:
class CTest
{
public:
CTest()=default;
~CTest()=default;
auto SomeFunc_Helper(std::integral_constant<int, 8> param) -> uint64_t*; //param is in reality more or less a self-implemented std::integral_constant
auto SomeFunc() -> [how do I get the return type of SomeFunc_Helper?]
{
return SomeFunc_Helper(std::integral_constant<int, sizeof(uintptr_t)>{});
}
};
因为SomeFunc()
我尝试过类似的东西
auto SomeFunc() ->decltype(&CTest::SomeFunc_Helper(std::integral_constant<int, 8>))
给我std::integral_constant<int, 8>
无法解决的错误。所以我的问题是如何进行从一个函数到另一个函数的类型转发?(欢迎使用不包括命名空间的 C++11 解决方案std::
)