unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help sought from C++ expert: is this `value' a type or something else (what)?
@ 2023-01-19 14:53 Alan Mackenzie
  2023-01-19 14:59 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alan Mackenzie @ 2023-01-19 14:53 UTC (permalink / raw)
  To: emacs-devel

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
font-lock-type-face.

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
<
    boost::is_same
    <
	boost::add_pointer<X>
	, int*
    >::value     // <===================================================
>::template then
<
    boost::remove_reference<X>
    // else
    , X
>::type modified_X;
/////////////////////////////////////////////////////////////////////////

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-01-21 14:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 14:53 Help sought from C++ expert: is this `value' a type or something else (what)? Alan Mackenzie
2023-01-19 14:59 ` Eli Zaretskii
2023-01-19 17:14   ` Difficulty building tree-sitter grammars [was: Help sought from C++ expert: ....] Alan Mackenzie
2023-01-19 17:53     ` Dmitry Gutov
2023-01-19 18:06       ` Eli Zaretskii
2023-01-19 18:16         ` Dmitry Gutov
2023-01-19 17:53     ` Eli Zaretskii
2023-01-19 20:56       ` Alan Mackenzie
2023-01-20  6:44         ` Eli Zaretskii
2023-01-19 15:41 ` Help sought from C++ expert: is this `value' a type or something else (what)? Michael Welsh Duggan
2023-01-21 14:34   ` Alan Mackenzie
2023-01-19 16:22 ` Óscar Fuentes
2023-01-21 14:59   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).