[Top][All Lists]

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

Help sought from C++ expert: is this `value' a type or something else (w

From: Alan Mackenzie
Subject: Help sought from C++ expert: is this `value' a type or something else (what)?
Date: Thu, 19 Jan 2023 14:53:22 +0000

Hello, Emacs.

In the following test file, templates-9.cc from the CC Mode test suite,
on the indicated line, what is the syntactic significance of `value'?
Traditionally, it has fontified with the default face, but recently after
some (not yet committed) changes in CC Mode, it has started getting

I don't understand the file at all, hardly, and can't work out whether
the old (non-) fontification was correct, or whether the new
fontification of f-l-type-face is correct.  Help would be appreciated.

Just as a matter of interest, in c++-ts-mode a treesit-query-error gets
thrown.  It isn't clear to me whether the file is still valid C++.

typedef std::pair<int
                  , std::pair<long
                              , std::pair<char*
                                          , std::pair<nil,nil>
                 > list_of_types;

typedef std::pair<
    int, std::pair<
        long, std::pair<
            char*, std::pair<nil,nil>
> list_of_types;

typedef typename if_true
        , int*
    >::value     // <===================================================
>::template then
    // else
    , X
>::type modified_X;


Alan Mackenzie (Nuremberg, Germany).

reply via email to

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