inline bool testConditionImpl(std::ostream& ss, S s) { #ifndef DBC_RELEASE bool testRslt = testConditionImplImpl(s); if(!testRslt) { s.msg(ss); ss<<std::endl; } return testRslt; #else return true; #endif }
inline bool testConditionImpl(std::ostream& ss, const char* file, int line, S s) { #ifndef SWEET_NO_DBC bool testRslt = testConditionImplImpl(s); if(!testRslt) { ss<<"At File '"<<file<<":"<<line<<" "; s.msg(ss); ss<<std::endl; } return testRslt; #else return true; #endif }
inline bool testConditionImpl(std::ostream& ss, S s, Ts... t) { #ifndef DBC_RELEASE bool testRslt = testConditionImplImpl(s); if(!testRslt) { s.msg(ss); ss<<std::endl; } bool other = testConditionImpl(ss, t...); return other && testRslt; #else return true; #endif }