Standard conformance issue / 7.1 
Author Message
 Standard conformance issue / 7.1

Hi

I'm a little bit concerned about you didn't revise min/max macro declaration
in windows.h as it makes std::min / max unusable. I would definitely suggest
to change this behaviour and inhibit min/max unless there is a special macro
DEFINED (not vice versa, as currently with NOMINMAX. It's very annoying to
define it all the times!).

Regards,
Stefan



Mon, 05 Dec 2005 18:35:12 GMT  
 Standard conformance issue / 7.1

Quote:

> Hi

> I'm a little bit concerned about you didn't revise min/max macro
> declaration in windows.h as it makes std::min / max unusable. I would
> definitely suggest to change this behaviour and inhibit min/max
> unless there is a special macro DEFINED (not vice versa, as currently
> with NOMINMAX. It's very annoying to define it all the times!).

Unfortunately, windows.h is not controlled by the VC team - it's controlled
by the Windows team.  The #defines of min/max are only one of thousands of
annoyances with windows.h, unfortunately.  Hopefully we'll see something
better in the next VC version, but it's a big problem to solve, since
windows.h is officially a 'C' API, not C++.  What's ultimately needed, IMO,
is a completely different C++ <cwindows> header that avoids all the myriad
macros, uses overloading for ANSI/Unicode support, etc.  If it were me, I'd
consider developing some custom mark-up, or perhaps use XML, to encode the
"master" windows.h, and develop tools to generate C and C++ bindings from
that master.

-cd



Mon, 05 Dec 2005 21:19:06 GMT  
 Standard conformance issue / 7.1
HI Carl,

Quote:
> What's ultimately needed, IMO,
> is a completely different C++ <cwindows> header that avoids all the myriad
> macros, uses overloading for ANSI/Unicode support, etc.

an excellent idea, what about writing C++ wrappers for all objects like they
did with WTL? would be a great step towards "professional windows API".

Stefan



Tue, 06 Dec 2005 03:12:18 GMT  
 Standard conformance issue / 7.1
That has been discussed, but it would be an _enormous_ amount of work so it
is somewhat unlikely to happen any time soon.

For this specific case, just do

#define NOMINMAX

before including windows.h.

Ronald



Quote:

> > Hi

> > I'm a little bit concerned about you didn't revise min/max macro
> > declaration in windows.h as it makes std::min / max unusable. I would
> > definitely suggest to change this behaviour and inhibit min/max
> > unless there is a special macro DEFINED (not vice versa, as currently
> > with NOMINMAX. It's very annoying to define it all the times!).

> Unfortunately, windows.h is not controlled by the VC team - it's
controlled
> by the Windows team.  The #defines of min/max are only one of thousands of
> annoyances with windows.h, unfortunately.  Hopefully we'll see something
> better in the next VC version, but it's a big problem to solve, since
> windows.h is officially a 'C' API, not C++.  What's ultimately needed,
IMO,
> is a completely different C++ <cwindows> header that avoids all the myriad
> macros, uses overloading for ANSI/Unicode support, etc.  If it were me,
I'd
> consider developing some custom mark-up, or perhaps use XML, to encode the
> "master" windows.h, and develop tools to generate C and C++ bindings from
> that master.

> -cd



Tue, 06 Dec 2005 03:01:11 GMT  
 Standard conformance issue / 7.1

Quote:
>> "professional windows API"

i think you're kinda talking about what the .NET framework is. Of course if
you don't want managed code ...


Quote:
> HI Carl,

> > What's ultimately needed, IMO,
> > is a completely different C++ <cwindows> header that avoids all the
myriad
> > macros, uses overloading for ANSI/Unicode support, etc.

> an excellent idea, what about writing C++ wrappers for all objects like
they
> did with WTL? would be a great step towards "professional windows API".

> Stefan



Tue, 06 Dec 2005 10:38:21 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Bug in VC 7.1 Standard C++ Library?

2. A few questions on standards conformance.

3. Standard conformance

4. VC++ standard conformance

5. Conformance of C++ to standard

6. VC++ 6 and standard conformance

7. ICE with vc 7.1 and simple spirit grammar

8. VC 7.1 seems to ignore typedef in template

9. auto_ptr assignment broken in 7.1?

10. Conversion from VC 7.0 to 7.1

11. Problem to convert from VC 6.0 to VC 7.1 because of using filebuf::setmode()

12. LAPACK with 7.1

 

 
Powered by phpBB® Forum Software