Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13315: boost 1.65.1 gcc 5.4 redefinition error in boost/type_traits/is_unsigned.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-01 13:23:58
#13315: boost 1.65.1 gcc 5.4 redefinition error in
boost/type_traits/is_unsigned.hpp
-------------------------------+--------------------------
Reporter: wiki908@⦠| Owner: John Maddock
Type: Support Requests | Status: new
Milestone: Boost 1.65.0 | Component: type_traits
Version: Boost 1.65.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------
Comment (by Michel Morin):
I think this is a compiler bug (though I don't understand what happens in
the code).
Here is a smaller testcase
{{{
#include <iostream>
typedef unsigned long long cl_ulong __attribute__((aligned(8)));
void f()
{
// unsigned long long x; // OK
cl_ulong x; // Error
std::cout << x;
}
template <class T> struct is_unsigned {};
template <> struct is_unsigned< unsigned long long> {};
template <> struct is_unsigned<const unsigned long long> {};
}}}
G++-5 fails to compile the code on C++11, 14, 17 modes with the following
error messages
{{{
Line14: error: redefinition of 'struct is_unsigned<long long unsigned
int>'
template <> struct is_unsigned<const unsigned long long> {};
^
Line13: error: previous definition of 'struct is_unsigned<long long
unsigned int>'
template <> struct is_unsigned< unsigned long long> {};
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13315#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-12-01 13:30:51 UTC