D
Devender Rao
I am having code from a library as shown below. I am not able to understand the purpose of "class ErrorAccessingPrivilegedAttribute;". Not sure how it works.
#define FAPI_ATTR_GET(ID, PTARGET, VAL) \
(fapiFailIfPrivileged<fapi::ID##_Privileged>(), \
fapiCheckIdType<fapi::ID##_Type>(ID, VAL), \
ID##_GETMACRO(ID, PTARGET, VAL))
template<typename T> inline void fapiCheckIdType(AttributeId, T &) {}
class ErrorAccessingPrivilegedAttribute;
template<const bool PRIVILEGED> void fapiFailIfPrivileged()
{
ErrorAccessingPrivilegedAttribute();
}
template <> inline void fapiFailIfPrivileged<false>() {}
Thank you in advance for any help.
#define FAPI_ATTR_GET(ID, PTARGET, VAL) \
(fapiFailIfPrivileged<fapi::ID##_Privileged>(), \
fapiCheckIdType<fapi::ID##_Type>(ID, VAL), \
ID##_GETMACRO(ID, PTARGET, VAL))
template<typename T> inline void fapiCheckIdType(AttributeId, T &) {}
class ErrorAccessingPrivilegedAttribute;
template<const bool PRIVILEGED> void fapiFailIfPrivileged()
{
ErrorAccessingPrivilegedAttribute();
}
template <> inline void fapiFailIfPrivileged<false>() {}
Thank you in advance for any help.