I am trying to implement all the `STL` functions on my own. 

In the `make_heap` function i need to swap the two objects. Now since i want it to `STL` like i cannot change my argument list.

**So i cannot declare a variable of the `object` that the `first` is pointing to.**

I also cannot use the `swap without temporary variables`

```
swap (RandomAccessIterator a,RandomAccessIterator b)
{
    *a = *a + *b;
    *b = *a - *b;
    *a = *a - *b;
}

```

because the operators `+` and `-` may not be overloaded for the given object the two pointers are pointing to.

Here is my Code :

```
template <class RandomAccessIterator>

void make_heap (RandomAccessIterator first,RandomAccessIterator last)
{

    int num_ele = (last - first) + 1;
    for (int i=num_ele-1;i>=1;i--)
    {
        if (first[i] < first[(i-1)/2])
        {
            swap (/* Here is where i am struck..! */);
        }
    }

}

```

PS : Assume the `objects` are comparable under < operator.