www.digitalmars.com         C & C++   DMDScript  

c++.beta - Template error

#include <iostream.h>

template <const char *& STR>
struct TEST {
TEST() {
cout << STR << endl;
}
};

const char *g = "Hello World";

int main()
{
TEST<g> obj;

return 0;
}

// results: 0x40b080
// digitalmars C++ 8.34.5 beta used.
Apr 18 2003