Is there a type-trait to remove top-level cv and reference at once?

后端 未结 2 413
情歌与酒
情歌与酒 2021-01-07 22:32

I just want to know if there is already one provided by the standard. I know it\'s easy to make one yourself

// for C++03, use  and st         


        
2条回答
  •  星月不相逢
    2021-01-07 23:11

    I prefer combining the two functionalities since it describes exactly what the intention is:

    C++11 std::remove_cv::type>::type

    C++14 std::remove_cv_t>

    C++20 std::remove_cvref_t

提交回复
热议问题