|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.beta - [8.50.1n] a bug
Snippet bellow fails in 8.50.1n. It is part of STLport as shipped with DMC.
Was present in 8.49.2n. Comeau compiles it.
------------code------------
struct __true_type {};
struct __false_type {};
template <int _Is>
struct __bool2type
{
typedef __false_type _Ret;
};
template<>
struct __bool2type<1> { typedef __true_type _Ret; };
template<>
struct __bool2type<0> { typedef __false_type _Ret; };
int main() {}
----end code--------------
with
C:\dm\bin>dmc a.cc
template <int _Is>
^
a.cc(5) : Error: '=', ';' or ',' expected
};
^
a.cc(9) : Error: identifier or '( declarator )' expected
template<>
^
a.cc(11) : Error: '=', ';' or ',' expected
struct __bool2type<1> { typedef __true_type _Ret; };
^
a.cc(12) : Error: identifier or '( declarator )' expected
template<>
^
a.cc(14) : Error: '=', ';' or ',' expected
Fatal error: too many errors
--- errorlevel 1
/Pavel
Nov 25 2006
Pavel Vozenilek wrote:Snippet bellow fails in 8.50.1n. It is part of STLport as shipped with DMC. Was present in 8.49.2n. Comeau compiles it. Nov 26 2006
"Walter Bright" wrote:Pavel Vozenilek wrote:Snippet bellow fails in 8.50.1n. It is part of STLport as shipped with DMC. Was present in 8.49.2n. Comeau compiles it. Nov 27 2006
It'd be nice if in sn.ini one could specify the C and C++ language extensions. "Pavel Vozenilek" <pavel_vozenilek yahoo.co.uk> wrote in message news:ekeevu$2m1e$1 digitaldaemon.com..."Walter Bright" wrote:Pavel Vozenilek wrote:Snippet bellow fails in 8.50.1n. It is part of STLport as shipped with DMC. Was present in 8.49.2n. Comeau compiles it. Nov 27 2006
|