Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Helpers/Assert.hpp

    r506d2f r23359f  
    180180 *
    181181 * <ul>
     182 * <li> <H4> How can I add values to the failure message of ASSERT(), e.g. I want to say that above "i"
     183 *      failed to be zero, with i == ...?</H4>
     184 * This can be done in the following way:
     185 * @code
     186 * ASSERT(!i,"i was not zero but "+std::string(i)+"after incrementing");
     187 * @endcode
     188 * Note that this works because std::string() in the middle requires the const char arrays on both ends
     189 * to be converted to string and eventually, the whole text is again cast to const char * form.
    182190 * <li> <H4> ASSERT() is broken. When I abort the program it says something about an
    183191 * "Illegal instruction"</H4>
     
    300308    public:
    301309      static bool check(const char* condition,
    302                         const char* message,
     310                        std::string message,
    303311                        const char* filename,
    304312                        const int line,
Note: See TracChangeset for help on using the changeset viewer.