Opened 21 years ago
Closed 21 years ago
#927 closed Bugs (Fixed)
Template parameters need identifiers
Reported by: | nobody | Owned by: | John Maddock |
---|---|---|---|
Milestone: | Component: | static_assert | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
I'm using a C++ compiler that uses the Edison Design Group C/C++ front end, version 2.35 (Aug 25 2000 16:41:36). The version of static_assert.hpp that I have is dated 02 August 2000, Initial version. That compiler requires identifiers following template type parameters. So I made two changes to the static_assert.h file to get it to compile using my compiler: template <bool> struct STATIC_ASSERTION_FAILURE; became template <bool b> struct STATIC_ASSERTION_FAILURE; and template<int> struct static_assert_test{}; became template<int i> struct static_assert_test{}; I have no idea what effect these changes might have on other compilers. By the way, I *love* this macro. I write embedded code, so a runtime assert is too late. The more stuff that can be caught at compile time the happier I am. Thanks.
Note:
See TracTickets
for help on using tickets.