aboutsummaryrefslogtreecommitdiff
path: root/pipermail/nel/2000-November/000015.html
diff options
context:
space:
mode:
Diffstat (limited to 'pipermail/nel/2000-November/000015.html')
-rw-r--r--pipermail/nel/2000-November/000015.html105
1 files changed, 105 insertions, 0 deletions
diff --git a/pipermail/nel/2000-November/000015.html b/pipermail/nel/2000-November/000015.html
new file mode 100644
index 00000000..95f27a17
--- /dev/null
+++ b/pipermail/nel/2000-November/000015.html
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Nel] matrix.cpp std::min/max problems?</TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:bryce%40neptune.net">
+ <LINK REL="Previous" HREF="000013.html">
+ <LINK REL="Next" HREF="000007.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Nel] matrix.cpp std::min/max problems?</H1>
+ <B>Bryce Harrington</B>
+ <A HREF="mailto:bryce%40neptune.net"
+ TITLE="[Nel] matrix.cpp std::min/max problems?">bryce@neptune.net</A><BR>
+ <I>Fri, 10 Nov 2000 03:43:08 -0800 (PST)</I>
+ <P><UL>
+ <LI> Previous message: <A HREF="000013.html">[Nel] matrix.cpp std::min/max problems?</A></li>
+ <LI> Next message: <A HREF="000007.html">[Nel] How do i compile this beast? Empty FAQ...</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#15">[ date ]</a>
+ <a href="thread.html#15">[ thread ]</a>
+ <a href="subject.html#15">[ subject ]</a>
+ <a href="author.html#15">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Heh, well sorry but that's MS for ya...
+
+As I recall, if you go MFC-free this particular issue will vanish.
+However there are other insidious STL bugs with Visual C++.
+
+If in fact you are using MFC, I would urge you to cease doing so at the
+earliest convenience. Not only for portability reasons (MFC *ain't*
+portable, especially not backwards-wise) but also because it is a poor
+architecture for GUI development, and is not really in the GPL spirit of
+things. If you intend to conduct your development openly as a net
+project, then crossplatformness is going to be especially treasured by
+you. There are many options for crossplatform GUI libs. Let me know if
+you'd like to discuss this more. My two preferred libs are wxWindows
+(good for OS-matching widgets for editors and similar), or libuta (SDL
+compatible and skinnable). Mozilla has another cross platform GUI lib
+but I've not used it in its current incarnation so don't know whether
+it's usable independently of Mozilla.
+
+FWIW, I always stick this boilerplate code in any file that uses STL
+that I'd like to compile with MSVC 4.2:
+
+#ifdef _MSC_VER
+// Fix broken STL implementation in MSVC 4.2
+// Include files (for MSVC)
+#pragma warning(disable: 4786) // Kludge to get around bug in MSVC 4.2
+#pragma warning(disable: 4788) // See above
+#endif
+
+I think you may be stuck including your own max/min template functions.
+That's a pretty minor thing compared with some of the patches you may
+have to make to work around some of the other issues (especially if you
+want to support pre-6.0 MSVC).
+
+Ultimately, you're going to want to trim down use of STL anyway, so you
+can recover the performance loss. We still use STL at WorldForge, for
+instance, but some simple tests show that hand coded, non-templated map
+and list classes provide some modest performance gains, and some day
+when we're down to squeezing out the last bits of performance, we'll
+probably be pulling STL out ourselves.
+
+Bryce
+
+On Fri, 10 Nov 2000, Vianney Lecroart wrote:
+
+&gt;<i> &gt; The VC++/STL min/max problem is pretty well known, and is a result of a
+</I>&gt;<i> &gt; very buggy STL implementation in VC++, and some lawsuits.
+</I>&gt;<i> &gt;
+</I>&gt;<i> &gt; Simple answer: Define NOMINMAX in your Build Settings
+</I>&gt;<i>
+</I>&gt;<i> ok, this define disables the macro min &amp; max, it's same behavior as doing
+</I>&gt;<i> #undef min #undef max
+</I>&gt;<i> but I search min in the VC include directory and subdirectory and there s
+</I>&gt;<i> *no* min
+</I>&gt;<i> definition in the STL (no template min) so we have to define our own min &amp;
+</I>&gt;<i> max
+</I>&gt;<i> template function in our code... no very cool...
+</I>
+--
+Bryce Harrington
+bryce @ neptune.net
+
+
+</pre>
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI> Previous message: <A HREF="000013.html">[Nel] matrix.cpp std::min/max problems?</A></li>
+ <LI> Next message: <A HREF="000007.html">[Nel] How do i compile this beast? Empty FAQ...</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#15">[ date ]</a>
+ <a href="thread.html#15">[ thread ]</a>
+ <a href="subject.html#15">[ subject ]</a>
+ <a href="author.html#15">[ author ]</a>
+ </LI>
+ </UL>
+</body></html>