------- Comment #5 from sebor at roguewave dot com 2006-09-26 18:56 ------- You mean something like: if (is_pointer (p)) delete p;
I suppose that could happen but why should it be any different than other non-sensical but lexically valid constructs with undefined behavior that require a diagnostic today? E.g.: template <int N> void foo () { if (0 < N) { int array [N]; ... } } Or: template <class T, class U> U* bar (T *p) { if (is_convertible<T*, U*>) return p; return 0; } Isn't template metaprogramming the expected solution to this type of a problem? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29185