octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: templated bitwise operators


From: c.
Subject: Re: templated bitwise operators
Date: Fri, 25 May 2012 17:56:30 +0200

On 25 May 2012, at 17:51, Jordi Gutiérrez Hermoso wrote:

> Death to macros! No more macros!
:D

> How about defining those templates instead? They're all pretty simple,
> e.g.:
> 
>    template<typename T>
>    T bit_and<T>(T a, T b)
>    {
>      return a & b;
>    }
> 
> This isn't exactly the same as std::bit_and, but I think it should
> work for this case.
OK I'll try this.

> What's the earliest gcc version we're targetting? Is it still 4.1 or
> thereabouts?
it's 4.2.1 

> I can't wait to use C++11 features. I'm hoping next year
> we can start doing that.
> - Jordi G. H.
c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]