ICP  1
dae_policy.h
Go to the documentation of this file.
1 #ifndef DAE_POLICY
2 #define DAE_POLICY
3 
4 enum unused_t { UNUSED_REGISTER = 1234 };
5 
7 template <typename T>
8 inline bool isRegisterUsed(const T& address)
9 {
10  return true;
11 }
12 
13 template <>
14 inline bool isRegisterUsed(const unused_t& address)
15 {
16  if ( UNUSED_REGISTER == address )
17  {
18  return false;
19  }
20  else
21  {
22  throw std::runtime_error("isRegisterUsed() - not set to UNUSED_REGISTER");
23  }
24 }
25 
26 #endif /* DAE_POLICY */
unused_t
Definition: dae_policy.h:4
bool isRegisterUsed(const T &address)
registers are either &quot;unsigned&quot; or &quot;unused_t&quot;
Definition: dae_policy.h:8