

|
 |
| Programming > C++ Moderated > Re: Meyers effe... |
|
| << Topic |
< Post |
Post 5 of 9 Topic 9501 of 9828
|
Post > |
Topic >> |
Re: Meyers effective C++, templates, np-complete
by Thomas Richter <thor@[EMAIL PROTECTED]
>
Apr 15, 2008 at 12:31 PM
| Todd Mars schrieb:
> Scott Meyers in Effective C++ at the start of the templates section
> says that C++ templates are np-complete in the compiler processing.
> Does this mean that the use of templates can cause the compile to
> execute for an infinite loop or near infinite loop?
If compilers would sup****t infinite template recursion, yes. However,
the standard also defines rules on how may levels of template resolution
a compiler has to sup****t, at minimum, and compilers simply abort the
recursion if it is too deep. Thus, templates *would* be NP complete if
there weren't restrictions setup exactly to avoid infinite loops.
So long,
Thomas
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|
9 Posts in Topic:
|
Todd Mars <tamnt54@[EM |
2008-04-14 21:22:01 |
|
Carl Barron <cbarron41 |
2008-04-15 12:28:24 |
|
=?ISO-8859-1?Q?Daniel_Kr= |
2008-04-15 12:29:15 |
|
Marcin.Barczynski@[EMAIL |
2008-04-15 12:32:41 |
|
Thomas Richter <thor@[ |
2008-04-15 12:31:09 |
|
Mathias Gaunard <loufo |
2008-04-15 12:32:35 |
|
Edward Rosten <Edward. |
2008-04-15 12:34:17 |
|
"Martin T." < |
2008-04-15 12:43:13 |
|
Vidar Hasfjord <vattil |
2008-04-16 11:38:44 |
|
Post A Reply:

|
|
|
|