[GD-General] Re: C++ turing complete
Brought to you by:
vexxed72
From: Patrick M D. <pa...@wa...> - 2001-12-24 00:46:13
|
On Sun, 23 Dec 2001, Jesse Jones wrote: > The difference is that templates are a Turing complete compile time > language. This is obviously enormously powerful (and awkward because > templates were never designed to do this). This lets you do all > manner of things. Here are a few: Is it true that templates are Turing complete? I've seen a simulation of a turing machine in C++ using templates but I've only been able to make halting programs execute. My compiler (gcc 2.95-2) complains when it evaluates a computation state that has already visited. Maybe gcc doesn't conform to the standard or C++ templates are not Turing complete? Even with limitations on the size of the tape and number of states, it should still be possible to write a (turing) program that does not halt. Patrick |