January 23, 2004
Here is a small program that causes "Internal error: template 1802" The program has a grammar error but I am presuming it is helpful to clean up internal errors no matter what caused them.

#include <iostream.h>

template <typename T, size_t N>
inline size_t array_len(   (&)[N]) {return N;}      //error, missing 'T'
//inline size_t array_len(T (&)[N]) {return N;}    //correct

int main()
{
    int        a[8];
    char     b[66];
    double c[5];

    cout << array_len(a) << '\n';
    cout << array_len(b) << '\n';
    cout << array_len(c) << '\n';
}