X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Georg Newsgroups: comp.os.msdos.djgpp Subject: Problem with template Date: Sat, 2 Jul 2011 09:31:46 -0700 (PDT) Organization: http://groups.google.com Lines: 27 Message-ID: NNTP-Posting-Host: 92.250.191.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1309624306 8074 127.0.0.1 (2 Jul 2011 16:31:46 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sat, 2 Jul 2011 16:31:46 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: q17g2000vby.googlegroups.com; posting-host=92.250.191.164; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr User-Agent: G2/1.0 X-HTTP-Via: 1.1 TAS-4-3.man-a X-Google-Web-Client: true X-Google-Header-Order: UALSERCVNKH X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4,gzip(gfe) Bytes: 1878 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I try to port a Linux program to DOS using DJGPP. I got quite far, but now I stumbled over these templates: namespace misc { template inline T min (T a, T b) { return a < b ? a : b; } template inline T max (T a, T b) { return a > b ? a : b; } template inline T min (T a, T b, T c) { return (min (a, min (b, c))); } template inline T max (T a, T b, T c) { return (max (a, max (b, c))); } This results in the following error for each template line: 35:31: error: expected ')' before 'a' Position 31 is just before the min or max. I am using gcc/gpp 453. What can I do to to avoid this error? The first two min/max templates are used many times within the package I try to port.