Heads-up: volatile and C++

Alexandre Oliva aoliva@redhat.com
Fri Apr 15 07:04:00 GMT 2005


On Apr 15, 2005, Marcin Dalecki <martin@dalecki.de> wrote:

> On 2005-04-15, at 01:10, Richard Henderson wrote:

>> template<classname T> T acquire(T *ptr);
>> template<classname T> void release(T *ptr, T val);
>> 
>> where the functions do the indirection plus the memory ordering?

> Templates are a no-go for a well known and well defined subset for C++
> for embedded programming known commonly as well embedded C++.

It doesn't really have to be templates.  Consider static_cast et al.
They look like template function calls, but aren't.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc mailing list