decltype(auto) in function return type does not deduces const types

前端 未结 0 2025
旧时难觅i
旧时难觅i 2021-02-15 05:20

In following code:

template
struct TD;

decltype(auto) getMyConst() {
    const int val = 10;
    return (const int)val; // const int cast is no         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题