什么之间的区别__PRETTY_FUNCTION__,__FUNCTION__,__func__,和他们在哪里记录?我如何决定使用哪一个?
__PRETTY_FUNCTION__
__FUNCTION__
__func__
c c++ compiler-construction standards
我试图找到以有效的方式记录方法名称的方法,以及速度和可维护性.我想,在.NET 4.5中,除了速度部分之外,呼叫者信息属性仅用于此目的.我觉得这些只是使用的语法糖System.Reflection.MethodBase.GetCurrentMethod()或stackTrace.GetFrame(1).GetMethod().Name(来自这里).(或)这些方法是否也具有性能优势?
System.Reflection.MethodBase.GetCurrentMethod()
stackTrace.GetFrame(1).GetMethod().Name
在C#中,有没有办法在编译时获取方法名称(就像在C++中一样)?
c# performance logging .net-4.5
特别是在linux上使用g ++,有没有办法确定为特定语句选择了哪个重载或模板函数?
更具体地说,我不认为我必须知道所有可能的选择,这些选择可能来自各种库的头文件.即使我这样做,我也不认为我可以修改相关代码.
c++ templates template-specialization overload-resolution
c++ ×2
.net-4.5 ×1
c ×1
c# ×1
compiler-construction ×1
logging ×1
overload-resolution ×1
performance ×1
standards ×1
template-specialization ×1
templates ×1