Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
tests
regress
25.random.shuffle.stdcxx-126.cpp
Go to the documentation of this file.
1
29
#include <algorithm>
30
#include <iterator>
31
32
33
template
<
class
IntT>
34
struct
DiffConvertible
35
{
36
DiffConvertible
(IntT) { }
37
operator
IntT ()
const
{
return
IntT (); }
38
39
private
:
40
template
<
class
T>
DiffConvertible
(
T
);
// not defined
41
};
42
43
44
template
<
class
IntT>
45
struct
Generator
46
{
47
DiffConvertible<IntT>
operator() (IntT
n
) {
48
return
DiffConvertible<IntT>
(
n
);
49
}
50
51
private
:
52
template
<
class
T>
void
operator() (
T
);
// not defined
53
};
54
55
56
// not defined
57
template
<
class
IntT,
class
T>
void
operator+
(
T
,
DiffConvertible<IntT>
);
58
template
<
class
IntT,
class
T>
void
operator+
(
T
,
DiffConvertible<IntT>
);
59
60
int
main
()
61
{
62
Generator<std::iterator_traits<int*>::difference_type
>
gen
;
63
64
int
a
= 0;
65
66
std::random_shuffle<int*>(&
a
, &
a
,
gen
);
67
68
return
0;
69
}
T
#define T
Definition
17.names.cpp:163
gen
#define gen
Definition
17.names.cpp:474
a
#define a
Definition
17.names.cpp:109
n
#define n
Definition
17.names.cpp:130
operator+
void operator+(T, DiffConvertible< IntT >)
main
int main()
Definition
25.random.shuffle.stdcxx-126.cpp:60
DiffConvertible
Definition
25.random.shuffle.stdcxx-126.cpp:35
DiffConvertible::DiffConvertible
DiffConvertible(IntT)
Definition
25.random.shuffle.stdcxx-126.cpp:36
Generator
Definition
25.generate.cpp:40
Generated by
1.9.8