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

Re: Syntax error in type_traits



Hi Jesper,

On Thu, Jan 16, 2025 at 12:38:29PM +0100, Jesper Dybdal wrote:
> There is a syntax error (an erroneous ">" character) in
>     /usr/include/c++/12/type_traits
> in Bookworm.

I do not experience this on my Debian 12.

> > In file included from /usr/include/c++/12/bits/char_traits.h:42,
> >                  from /usr/include/c++/12/string:40,
> >                  from error.cpp:1:
> > /usr/include/c++/12/type_traits:2614:11: error: expected identifier
> > before ‘>’ token
> >  2614 |     using >enable_if_t = typename enable_if<_Cond, _Tp>::type;
> >       |           ^

My file doesn't have that line:

$ cat -n /usr/include/c++/12/type_traits | head -n 2620 | tail -n 10
  2611
  2612    /// Alias template for enable_if
  2613    template<bool _Cond, typename _Tp = void>
  2614      using enable_if_t = typename enable_if<_Cond, _Tp>::type;
  2615
  2616    /// Alias template for conditional
  2617    template<bool _Cond, typename _Iftrue, typename _Iffalse>
  2618      using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type;
  2619
  2620    /// Alias template for common_type

Is your file supplied from a different package to mine?

$ dpkg -S /usr/include/c++/12/type_traits
libstdc++-12-dev:amd64: /usr/include/c++/12/type_traits
$ apt policy libstdc++-12-dev:amd64
libstdc++-12-dev:
  Installed: 12.2.0-14
  Candidate: 12.2.0-14
  Version table:
 *** 12.2.0-14 500
        500 http://acng.localnet/deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status

> Could someone familiar with the correct way of reporting such things please
> report this?

First we need to work out where your file came from.

> > jd@nuser:~$ g++ --version
> > g++ (Debian 12.2.0-14) 12.2.0

This matches for me, but the file in question is not from the same
package as the g++ binary, so this doesn't prove anything.

You may like to download the .deb file for libstdc++-12-dev, unpack it
somewhere and see what else is different about your copy of that file
(and, perhaps, others).

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: