Skip to content

Commit 874f0de

Browse files
author
Eric Niebler
committed
remove minmax hack from win32.hpp and fix all places that could be affected by the minmax macros
[SVN r22394]
0 parents  commit 874f0de

File tree

2 files changed

+147
-0
lines changed

2 files changed

+147
-0
lines changed

.gitattributes

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
* text=auto !eol svneol=native#text/plain
2+
*.gitattributes text svneol=native#text/plain
3+
4+
# Scriptish formats
5+
*.bat text svneol=native#text/plain
6+
*.bsh text svneol=native#text/x-beanshell
7+
*.cgi text svneol=native#text/plain
8+
*.cmd text svneol=native#text/plain
9+
*.js text svneol=native#text/javascript
10+
*.php text svneol=native#text/x-php
11+
*.pl text svneol=native#text/x-perl
12+
*.pm text svneol=native#text/x-perl
13+
*.py text svneol=native#text/x-python
14+
*.sh eol=lf svneol=LF#text/x-sh
15+
configure eol=lf svneol=LF#text/x-sh
16+
17+
# Image formats
18+
*.bmp binary svneol=unset#image/bmp
19+
*.gif binary svneol=unset#image/gif
20+
*.ico binary svneol=unset#image/ico
21+
*.jpeg binary svneol=unset#image/jpeg
22+
*.jpg binary svneol=unset#image/jpeg
23+
*.png binary svneol=unset#image/png
24+
*.tif binary svneol=unset#image/tiff
25+
*.tiff binary svneol=unset#image/tiff
26+
*.svg text svneol=native#image/svg%2Bxml
27+
28+
# Data formats
29+
*.pdf binary svneol=unset#application/pdf
30+
*.avi binary svneol=unset#video/avi
31+
*.doc binary svneol=unset#application/msword
32+
*.dsp text svneol=crlf#text/plain
33+
*.dsw text svneol=crlf#text/plain
34+
*.eps binary svneol=unset#application/postscript
35+
*.gz binary svneol=unset#application/gzip
36+
*.mov binary svneol=unset#video/quicktime
37+
*.mp3 binary svneol=unset#audio/mpeg
38+
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
39+
*.ps binary svneol=unset#application/postscript
40+
*.psd binary svneol=unset#application/photoshop
41+
*.rdf binary svneol=unset#text/rdf
42+
*.rss text svneol=unset#text/xml
43+
*.rtf binary svneol=unset#text/rtf
44+
*.sln text svneol=native#text/plain
45+
*.swf binary svneol=unset#application/x-shockwave-flash
46+
*.tgz binary svneol=unset#application/gzip
47+
*.vcproj text svneol=native#text/xml
48+
*.vcxproj text svneol=native#text/xml
49+
*.vsprops text svneol=native#text/xml
50+
*.wav binary svneol=unset#audio/wav
51+
*.xls binary svneol=unset#application/vnd.ms-excel
52+
*.zip binary svneol=unset#application/zip
53+
54+
# Text formats
55+
.htaccess text svneol=native#text/plain
56+
*.bbk text svneol=native#text/xml
57+
*.cmake text svneol=native#text/plain
58+
*.css text svneol=native#text/css
59+
*.dtd text svneol=native#text/xml
60+
*.htm text svneol=native#text/html
61+
*.html text svneol=native#text/html
62+
*.ini text svneol=native#text/plain
63+
*.log text svneol=native#text/plain
64+
*.mak text svneol=native#text/plain
65+
*.qbk text svneol=native#text/plain
66+
*.rst text svneol=native#text/plain
67+
*.sql text svneol=native#text/x-sql
68+
*.txt text svneol=native#text/plain
69+
*.xhtml text svneol=native#text/xhtml%2Bxml
70+
*.xml text svneol=native#text/xml
71+
*.xsd text svneol=native#text/xml
72+
*.xsl text svneol=native#text/xml
73+
*.xslt text svneol=native#text/xml
74+
*.xul text svneol=native#text/xul
75+
*.yml text svneol=native#text/plain
76+
boost-no-inspect text svneol=native#text/plain
77+
CHANGES text svneol=native#text/plain
78+
COPYING text svneol=native#text/plain
79+
INSTALL text svneol=native#text/plain
80+
Jamfile text svneol=native#text/plain
81+
Jamroot text svneol=native#text/plain
82+
Jamfile.v2 text svneol=native#text/plain
83+
Jamrules text svneol=native#text/plain
84+
Makefile* text svneol=native#text/plain
85+
README text svneol=native#text/plain
86+
TODO text svneol=native#text/plain
87+
88+
# Code formats
89+
*.c text svneol=native#text/plain
90+
*.cpp text svneol=native#text/plain
91+
*.h text svneol=native#text/plain
92+
*.hpp text svneol=native#text/plain
93+
*.ipp text svneol=native#text/plain
94+
*.tpp text svneol=native#text/plain
95+
*.jam text svneol=native#text/plain
96+
*.java text svneol=native#text/plain

include/boost/minmax.hpp

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// (C) Copyright Eric Niebler 2004.
2+
// Use, modification and distribution are subject to the
3+
// Boost Software License, Version 1.0. (See accompanying file
4+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5+
6+
/*
7+
Revision history:
8+
25 February 2004
9+
Initial version.
10+
*/
11+
12+
#ifndef BOOST_MINMAX_HPP
13+
#define BOOST_MINMAX_HPP
14+
15+
#include <algorithm> // for std::min and std::max
16+
#include <boost/config.hpp>
17+
18+
namespace boost
19+
{
20+
21+
template< typename T >
22+
inline T const & std_min( T const & a, T const & b )
23+
{
24+
#if defined(__COMO__) || defined(BOOST_INTEL) || defined(BOOST_NO_STD_MIN_MAX)
25+
using std::min;
26+
#elif defined(BOOST_NO_STDC_NAMESPACE)
27+
using ::min;
28+
#else
29+
using std::min;
30+
#endif
31+
32+
return min BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b );
33+
}
34+
35+
template< typename T >
36+
inline T const & std_max( T const & a, T const & b )
37+
{
38+
#if defined(__COMO__) || defined(BOOST_INTEL) || defined(BOOST_NO_STD_MIN_MAX)
39+
using std::max;
40+
#elif defined(BOOST_NO_STDC_NAMESPACE)
41+
using ::max;
42+
#else
43+
using std::max;
44+
#endif
45+
46+
return max BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b );
47+
}
48+
49+
}
50+
51+
#endif // BOOST_MINMAX_HPP

0 commit comments

Comments
 (0)