@@ -86,19 +86,19 @@ inline void sct_assert(bool expr, const char* msg) {}
8686struct sct_property_mod
8787{
8888 explicit sct_property_mod () {}
89- template <class T1 , class T2 >
90- explicit sct_property_mod (bool lexpr, bool rexpr, sc_event_finder& event,
89+ template <class T1 , class T2 , class RT >
90+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_event_finder& event,
9191 const char * name, T1 lotime, T2 hitime,
9292 unsigned stable) {}
93- template <class T1 >
94- explicit sct_property_mod (bool lexpr, bool rexpr, sc_event_finder& event,
93+ template <class T1 , class RT >
94+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_event_finder& event,
9595 const char * name, T1 time, unsigned stable) {}
96- template <class T1 , class T2 >
97- explicit sct_property_mod (bool lexpr, bool rexpr, sc_port_base& event,
96+ template <class T1 , class T2 , class RT >
97+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_port_base& event,
9898 const char * name, T1 lotime, T2 hitime,
9999 unsigned stable) {}
100- template <class T1 >
101- explicit sct_property_mod (bool lexpr, bool rexpr, sc_port_base& event,
100+ template <class T1 , class RT >
101+ explicit sct_property_mod (bool lexpr, RT rexpr, sc_port_base& event,
102102 const char * name, T1 time, unsigned stable) {}
103103};
104104
@@ -111,17 +111,17 @@ struct sct_property_mod
111111
112112 #define SCT_ASSERT4_STABLE (LE, TIMES, RE, EVENT )\
113113 sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
114- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
114+ static_cast <bool >(LE), RE , EVENT,\
115115 " sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 1 };
116116
117117 #define SCT_ASSERT4_ROSE (LE, TIMES, RE, EVENT )\
118118 sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
119- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
119+ static_cast <bool >(LE), RE , EVENT,\
120120 " sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 2 };
121121
122122 #define SCT_ASSERT4_FELL (LE, TIMES, RE, EVENT )\
123123 sct_property_mod SCT_TWO (sctTmpVar,__LINE__){\
124- static_cast <bool >(LE), static_cast < bool >(RE) , EVENT,\
124+ static_cast <bool >(LE), RE , EVENT,\
125125 " sctAssertLine" SCT_ONE (__LINE__), SCT_ARGS (TIMES), 3 };
126126#else
127127 // No parameter passed, LE/RE can use not-bound port/not-allocated pointers
@@ -140,7 +140,7 @@ struct sct_property_mod
140140
141141#else
142142#define SCT_ASSERT4 (LE, TIMES, RE, EVENT )\
143- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
143+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
144144 sct_property_storage::getProperty(\
145145 [&]()->bool{return ( LE );},\
146146 [&]()->bool {return ( RE );},\
@@ -150,32 +150,32 @@ struct sct_property_mod
150150 );
151151
152152#define SCT_ASSERT4_STABLE (LE, TIMES, RE, EVENT )\
153- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
153+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
154154 sct_property_storage::getPropertyStable(\
155155 [&]()->bool{return ( LE );},\
156- [&]()->bool {return ( RE );},\
156+ [&]()->decltype (RE) {return ( RE );},\
157157 &EVENT,\
158158 [&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
159159 std::string (__FILE__)+":"+std::to_string(__LINE__),\
160160 stStable\
161161 );
162162
163163#define SCT_ASSERT4_ROSE (LE, TIMES, RE, EVENT )\
164- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
164+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
165165 sct_property_storage::getPropertyStable(\
166166 [&]()->bool{return ( LE );},\
167- [&]()->bool {return ( RE );},\
167+ [&]()->decltype (RE) {return ( RE );},\
168168 &EVENT,\
169169 [&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
170170 std::string (__FILE__)+":"+std::to_string(__LINE__),\
171171 stRose\
172172 );
173173
174174#define SCT_ASSERT4_FELL (LE, TIMES, RE, EVENT )\
175- sct_property * SCT_TWO (sctTmpVar,__LINE__) =\
175+ sct_property_base * SCT_TWO (sctTmpVar,__LINE__) =\
176176 sct_property_storage::getPropertyStable(\
177177 [&]()->bool{return ( LE );},\
178- [&]()->bool {return ( RE );},\
178+ [&]()->decltype (RE) {return ( RE );},\
179179 &EVENT,\
180180 [&]()->sct_time{return (sct_time (SCT_ARGS (TIMES)));},\
181181 std::string (__FILE__)+":"+std::to_string(__LINE__),\
0 commit comments