Skip to content

Commit d578504

Browse files
committed
This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches. [SVN r7621]
0 parents  commit d578504

File tree

2 files changed

+239
-0
lines changed

2 files changed

+239
-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/array.hpp

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// -*-C++-*- array.hpp
2+
// <!!---------------------------------------------------------------------->
3+
// <!! Copyright (C) 1998 Dietmar Kuehl, Claas Solutions GmbH >
4+
// <!!>
5+
// <!! Permission to use, copy, modify, distribute and sell this >
6+
// <!! software for any purpose is hereby granted without fee, provided >
7+
// <!! that the above copyright notice appears in all copies and that >
8+
// <!! both that copyright notice and this permission notice appear in >
9+
// <!! supporting documentation. Dietmar Kuehl and Claas Solutions make no >
10+
// <!! representations about the suitability of this software for any >
11+
// <!! purpose. It is provided "as is" without express or implied warranty. >
12+
// <!!---------------------------------------------------------------------->
13+
14+
// Author: Dietmar Kuehl [email protected]
15+
// Title: STL container support, including support for built-in arrays
16+
// Version: $Id$
17+
18+
// --------------------------------------------------------------------------
19+
20+
#if !defined(BOOST_ARRAY_HPP)
21+
#define BOOST_ARRAY_HPP 1
22+
23+
// --------------------------------------------------------------------------
24+
25+
#include <cstddef>
26+
27+
// --------------------------------------------------------------------------
28+
29+
namespace boost
30+
{
31+
32+
// --- a general version of container traits ------------------------------
33+
34+
template <typename Cont>
35+
struct array_traits
36+
{
37+
typedef typename Cont::iterator iter_type;
38+
typedef typename Cont::size_type size_type;
39+
static iter_type begin(Cont &cont) { return cont.begin(); }
40+
static iter_type end(Cont &cont) { return cont.end(); }
41+
static size_type size(Cont &cont) { return cont.size(); }
42+
};
43+
44+
// --- a version of container traits for constant constainer --------------
45+
46+
template <typename Cont>
47+
struct array_traits<Cont const>
48+
{
49+
typedef typename Cont::const_iterator iter_type;
50+
typedef typename Cont::size_type size_type;
51+
static iter_type begin(Cont const &cont) { return cont.begin(); }
52+
static iter_type end(Cont const &cont) { return cont.end(); }
53+
static size_type size(Cont const &cont) { return cont.size(); }
54+
};
55+
56+
// --- a special version for non-const built-in arrays --------------------
57+
58+
template <typename T, size_t sz>
59+
struct array_traits<T[sz]>
60+
{
61+
typedef T* iter_type;
62+
typedef size_t size_type;
63+
static iter_type begin(T (&array)[sz]) { return array; }
64+
static iter_type end(T (&array)[sz]) { return array + sz; }
65+
static size_type size(T (&)[sz]) { return sz; }
66+
};
67+
68+
// --- a special version for const built-in arrays ------------------------
69+
70+
template <typename T, size_t sz>
71+
struct array_traits<T const[sz]>
72+
{
73+
typedef T const* iter_type;
74+
typedef size_t size_type;
75+
static iter_type begin(T const (&array)[sz]) { return array; }
76+
static iter_type end(T const (&array)[sz]) { return array + sz; }
77+
static size_type size(T const (&array)[sz]) { return sz; }
78+
};
79+
80+
template <typename T, int sz>
81+
inline char (&sizer(T (&)[sz]))[sz];
82+
83+
// --- general version of the global accessor functions ---------------------
84+
85+
template <typename Cont>
86+
inline typename array_traits<Cont>::iter_type
87+
begin(Cont &cont) { return array_traits<Cont>::begin(cont); }
88+
89+
template <typename Cont>
90+
inline typename array_traits<Cont>::iter_type
91+
end(Cont &cont) { return array_traits<Cont>::end(cont); }
92+
93+
template <typename Cont>
94+
inline typename array_traits<Cont>::size_type
95+
size(Cont &cont) { return array_traits<Cont>::size(cont); }
96+
97+
// --- Actually the above should be sufficient but compilers seem -----------
98+
// --- to welcome some help. So here we go:
99+
100+
template <typename T, size_t sz>
101+
inline typename array_traits<T[sz]>::iter_type
102+
begin(T (&a)[sz]) { return array_traits<T[sz]>::begin(a); }
103+
104+
template <typename T, size_t sz>
105+
inline typename array_traits<T[sz]>::iter_type
106+
end(T (&a)[sz]) { return array_traits<T[sz]>::end(a); }
107+
108+
template <typename T, size_t sz>
109+
inline typename array_traits<T[sz]>::size_type
110+
size(T (&a)[sz]) { return array_traits<T[sz]>::size(a); }
111+
112+
// --- Apparently the compilers also need some specific help, ---------------
113+
114+
// --- EDG-2.39 wants to pass around pointers in some contexts --------------
115+
#ifdef __EDG__
116+
template <typename T>
117+
struct array_traits<T*>
118+
{
119+
typedef T* iter_type;
120+
typedef size_t size_type;
121+
};
122+
#endif
123+
124+
// --- egcs-1998-11-22 apparently likes an extra const version: -------------
125+
#ifdef __GNUG__
126+
template <typename T, size_t sz>
127+
inline typename array_traits<T const[sz]>::iter_type
128+
begin(T const(&a)[sz]) { return array_traits<T const[sz]>::begin(a); }
129+
130+
template <typename T, size_t sz>
131+
inline typename array_traits<T const[sz]>::iter_type
132+
end(T const(&a)[sz]) { return array_traits<T const[sz]>::end(a); }
133+
134+
template <typename T, size_t sz>
135+
inline typename array_traits<T const[sz]>::size_type
136+
size(T const (&a)[sz]) { return array_traits<T const[sz]>::size(a); }
137+
#endif
138+
139+
}
140+
141+
// -----------------------------------------------------------------------------
142+
143+
#endif /* BOOST_ARRAY_HPP */

0 commit comments

Comments
 (0)