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

前端 未结 0 428
南方客
南方客 2021-02-15 05:34

In following code:

template
struct TD;

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


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