g++ __FUNCTION__ replace time

后端 未结 7 705
迷失自我
迷失自我 2020-12-20 17:16

Can anyone tell when g++ replaces the __FUNCTION__ \'macro\' with the string containing the function name? It seems it can replace it not until it has check the

7条回答
  •  春和景丽
    2020-12-20 17:34

    __FUNCTION__ is not standard. Use __func__. As the documentation says, it's as if:

     function_name(  )
    {
        static const char __func__[] = "function-name";
        ...
    

提交回复
热议问题