本文共 567 字,大约阅读时间需要 1 分钟。
std::remove_reference
其中: std::remove_reference_t 实现:template< class T >using remove_reference_t = typename remove_reference::type;
样例:
#include// std::cout#include // std::is_same template void print_is_same() { std::cout << std::is_same () << '\n';} int main() { std::cout << std::boolalpha; print_is_same (); print_is_same (); print_is_same (); print_is_same
输出:
true false false true true true转载地址:http://ldwmi.baihongyu.com/