[squid-dev] More woes with ubuntu-precise

Alex Rousskov rousskov at measurement-factory.com
Thu Aug 13 22:18:05 UTC 2015


On 08/13/2015 09:29 AM, Kinkie wrote:

>    EnumIterator has brought out one more issue with ubuntu-precise:
> since it carries gcc-4.6, it doesn't support std::underlying_type<enum>.


> The options are:
> - drop support for precise in trunk. We claim to need gcc 4.8 anyway

I am confused: If GCC v4.8 is required, then why are you asking about a
Ubuntu release that comes with GCC v4.6? Does it imply that we were only
pretending to require GCC v4.8 and now may actually have to start
requiring it?


> - not to use std::underlying_type and blindly use int.
> - do template metaprogramming to detect std::underlying_type, fall back
> to int if not possible
> - use autoconf
> 
> 3. and 4. are quite crazy IMO but I mentioned them for completeness' sake.
> Any opinion on 1. and 2.?


If we do not truly require GCC v4.8 yet, then I like #2 because it is
simple and sufficient.

[ If you have to replace std::underlying_type<Enum>::type with "int"
more than once, ] please add a named type so that it is easy to find
such replacements. Do not just use "int" directly.

    typedef underlying_enum_type int;

HTH,

Alex.



More information about the squid-dev mailing list