You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
529 B
35 lines
529 B
template <class T>
|
|
inline void
|
|
x3(T & a, T & b, T & c)
|
|
{
|
|
T temp;
|
|
if (b < a)
|
|
{
|
|
if (c < a)
|
|
{ // b , c < a
|
|
if (b < c)
|
|
{ // b < c < a
|
|
temp = a;
|
|
a = b;
|
|
b = c;
|
|
c = temp;
|
|
}
|
|
else
|
|
{ // c <=b < a
|
|
std::swap(c, a);
|
|
}
|
|
}
|
|
else
|
|
{ // b < a <=c
|
|
// second line of comment
|
|
std::swap(a, b);
|
|
}
|
|
}
|
|
0;
|
|
0;
|
|
0;
|
|
if (1) // always
|
|
do_something();
|
|
}
|
|
|