Re: [AD] Proposal for new Allegro interface

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Yes, because it is not a macro

but then try
void other_clear(void) {
}

#define clear() other_clear()

#include <list>
 
 void test(std::list<int>& l)
{
     l.clear();
}


> > However, do we even need this? The following example compiles perfectly
> > under GCC's C++. Can somebody try it on MSVC, Borland, etc.? Thanks.
> 
> int other_clear = 0;
> 
> #define clear other_clear
> 
> #include <list>
> 
> void test(std::list<int>& l)
> {
>     l.clear();
> }
> 
> Compiles under MSVC 6.0 sp5.
> 
> --
> Elias Pschernig
> 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/