www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.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++ - Bug: casts + scope symbol

↑ ↓ ← "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
namespace ns
{
  typedef long    rc;

} // namespace ns

::ns::rc    r1  =   10;

namespace ns
{
  rc  r2  =   static_cast<rc>(10);

  rc  r3  =   static_cast<ns::rc>(10);

  rc  r4  =   static_cast<::ns::rc>(10); // Error: '<' expected following cast

} // namespace ns

::ns::rc  r5  =   static_cast<ns::rc>(10);

::ns::rc  r6  =   static_cast<::ns::rc>(10); // Error: '<' expected following
cast
Mar 23 2005
↑ ↓ Christof Meerwald <cmeerw web.de> writes:
On Thu, 24 Mar 2005 12:47:25 +1100, Matthew wrote:
 rc r4 = static_cast<::ns::rc>(10); // Error: '<' expected following cast

Hmm, it's not a bug, <: is a digraph. bye, Christof -- http://cmeerw.org mailto:cmeerw at web.de xmpp:cmeerw at cmeerw.org ...and what have you contributed to the Net?
Mar 24 2005
↑ ↓ "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Yikes, you're right.

Man, that's truly insidious and evil.

C++ sometimes makes one weep real tears.

"Christof Meerwald" <cmeerw web.de> wrote in message
news:newscache$pxlvdi$hv$1 msgid.cmeerw.org...
 On Thu, 24 Mar 2005 12:47:25 +1100, Matthew wrote:
 rc r4 = static_cast<::ns::rc>(10); // Error: '<' expected following cast

Hmm, it's not a bug, <: is a digraph. bye, Christof -- http://cmeerw.org mailto:cmeerw at web.de xmpp:cmeerw at cmeerw.org ...and what have you contributed to the Net?

Mar 24 2005
↑ ↓ → "Walter" <newshound digitalmars.com> writes:
"Matthew" <admin stlsoft.dot.dot.dot.dot.org> wrote in message
news:d20o68$2d7j$1 digitaldaemon.com...
 Yikes, you're right.

 Man, that's truly insidious and evil.

 C++ sometimes makes one weep real tears.

D doesn't have digraphs <g>. (or trigraphs, another loser feature) I've never seen either appear in a real program outside of a test suite.
Mar 28 2005