VC 8.0: Where is two phase lookup?

S

Stefan Slapeta

Carl said:
... MS would consider implementing it when there's sufficient market demand
for it, at that time providing a smooth migration path becasue two-phase
lookup will break a lot of code.

As I said before - if you make it an optional feature,

.... you could find name lookup issues in your code
.... nobody would have to change any code if he doesn't like to
.... (thus) you wouldn't need any migration path
.... you would (optionally) have more standard conformance in your compiler


Stefan
 
C

Carl Daniel [VC++ MVP]

Stefan said:
As I said before - if you make it an optional feature,

... you could find name lookup issues in your code
... nobody would have to change any code if he doesn't like to
... (thus) you wouldn't need any migration path
... you would (optionally) have more standard conformance in your
compiler

And I'm sure that's what they'll do eventally (Herb pretty much said so) -
but not in Whidbey.

-cd
 
T

tom_usenet

It's the same - the second g is no candidate for the overload set (it's
not seen at the time of parsing the template).

Nonsense - in the expression "g(t)" g is a dependent name, so lookup
is deferred. IOW, g(int) is called.

Tom
 
T

tom_usenet

I think that all these statements are quite exaggerated; from my
experience, the impact on existing projects normally is quite small.

BTW, with two-phase lookup turned on, the 7.1 standard lib compiles
without any problems if you just make two very small patches (one in
xdebug and on in xlocale).

The 7.1 standard lib is Dinkumware's, and that works with Comeau C++,
which has had 2 phase lookup for years. They fixed any such problems
it had with two phase lookup years ago. Presumably the errors are
coming from VC 7.1 specific code in the library.

Tom
 
S

Stefan Slapeta

tom_usenet said:
Nonsense - in the expression "g(t)" g is a dependent name, so lookup
is deferred. IOW, g(int) is called.

Maybe you should try it out before you talk about nonsense. And - read
my postings.

Stefan
 
B

Bo Persson

tom_usenet said:
Stefan said:
Carl Daniel [VC++ MVP] wrote:

... MS would consider implementing it when there's sufficient
market demand
for it, at that time providing a smooth migration path becasue
two-phase lookup will break a lot of code.

As I said before - if you make it an optional feature,

... you could find name lookup issues in your code
... nobody would have to change any code if he doesn't like to
... (thus) you wouldn't need any migration path
... you would (optionally) have more standard conformance in your
compiler

And I'm sure that's what they'll do eventally (Herb pretty much said so) -
but not in Whidbey.

VC is now one of the few mainstream compilers that doesn't have two
phase name lookup. GCC 3.4 was the first GCC version with it.

http://gcc.gnu.org/gcc-3.4/changes.html#cplusplus

Microsoft are back to playing conformance catch-up!

Yes, they are once again spending their effort on yet another managed
version of C++, instead of doing the real thing. Sigh!


Here's another company which DO have a beta of a compliant compiler.
http://www.borland.com/products/downloads/download_cbuilderx.html

Unfortunately they wrote the development environment in Java. Write
once, wait everywhere...



We'll have to start shouting louder again, so MS realizes that there IS
a customer demand!



Bo Persson
 
R

Russell Hind

Bo said:
Here's another company which DO have a beta of a compliant compiler.
http://www.borland.com/products/downloads/download_cbuilderx.html

Unfortunately they wrote the development environment in Java. Write
once, wait everywhere...

I've been using CBX since it was released last october and don't have a
problem with the speed of the IDE even though it is in Java. Running on
2.4GHz P4 with 1Gb RAM.

The compiler did seem to work well, but was only a beta and couldn't be
used for anything more than a few simple tests (well no multi-threading
support in the beta was a killer for me).

Unfortunately it seems Borland are no concentrating on mobile
applications development (palm, symbian etc) with CBX. They may be
doing another version of C++Builder with VCL but the new compiler will
only be useful in that if they add the VCL required extensions to it
(something the preview didn't have). The new compiler was intended for
wxWindows, but that work has since been put on hold and Borland haven't
released any details as it if/when they will do a new C++ product for
Desktop development.

A shame as the compiler did seem promising and the CBX IDE has some very
nice touches (although in v1, some missing features too).

Cheers

Russell
 
T

tom_usenet

Maybe you should try it out before you talk about nonsense. And - read
my postings.

Whoops, my apologies - "int" has no associated namespaces, so ADL
doesn't find g(int) in the global namespace. I should have read your
earlier post.

Tom
 
H

Hendrik Schober

Carl Daniel said:
[...] two-phase lookup is related to export and
that MS would consider implementing it when there's sufficient market demand
for it [...]

Consider me demanding very loudly, then.

Recently, I more and more find myself
developing template code using CodeWarrior
on the Mac and porting the code back to
VC, as CW has this feature. Maybe it's just
that, as I get deeper into template stuff,
I am doing more weird stuff -- but porting
template code /from/ VC /to/ the any other
compiler is becoming a major pain. It is
bad enough now that I put up with using CW
on the Mac, where I need the mouse so much.
(And I hate that!)

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top