Suppose I have code like this:
template<class T, T initial_t> class Bar {
// something
}
And then try to use it like this:
Bar<Foo*, NULL> foo_and_bar_whatever_it_means_;
GCC bails out with error (on the above line):
could not convert template argument '0' to 'Foo*'
I found this thread: http://gcc.gnu.org/ml/gcc-help/2007-11/msg00066.html, but I have to use NULL in this case (ok, I could probably refactor - but it would not be trivial; any suggestions?). I tried to overcome the problem by creating a variable with value of NULL, but GCC still complains that I pass variable and not address of variable as a template argument. And reference to a variable initialized with default ctor would not be the same as NULL.