public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Adding p1004 for C++20 -- constexpr std::vector
@ 2020-07-28  1:40 Josh Marshall
  2020-07-28  9:22 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Marshall @ 2020-07-28  1:40 UTC (permalink / raw)
  To: gcc-help

Hello,

I'm working on a project to implement a Hidden Markov Model and move
as much of it to compile time as possible.  The last part that is
blocking me is constexpr vector support.  What exactly might I be
getting myself into if I were to add this support?

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

* Re: Adding p1004 for C++20 -- constexpr std::vector
  2020-07-28  1:40 Adding p1004 for C++20 -- constexpr std::vector Josh Marshall
@ 2020-07-28  9:22 ` Jonathan Wakely
  2020-07-28 17:58   ` Josh Marshall
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2020-07-28  9:22 UTC (permalink / raw)
  To: Josh Marshall; +Cc: gcc-help

On Tue, 28 Jul 2020 at 02:41, Josh Marshall via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hello,
>
> I'm working on a project to implement a Hidden Markov Model and move
> as much of it to compile time as possible.  The last part that is
> blocking me is constexpr vector support.  What exactly might I be
> getting myself into if I were to add this support?

Adding the _GLIBCXX20_CONSTEXPR macro to every member function of
std::vector, writing tests, seeing what breaks, and refactoring the
code to make it work correctly.

The hardest part is probably writing all the tests, to ensure that
every member function works as part of a constant expression.

There are also some legal prerequisites for contributing non-trivial
patches to GCC, see https://gcc.gnu.org/contribute.html#legal for more
information.

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

* Re: Adding p1004 for C++20 -- constexpr std::vector
  2020-07-28  9:22 ` Jonathan Wakely
@ 2020-07-28 17:58   ` Josh Marshall
  2020-07-28 20:54     ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Marshall @ 2020-07-28 17:58 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Sent out for legal forms.  I'll try to add the support here.  Can you
tell me what I should be reading for testing, coding standards, and
other stuff for a new contributor?

On Tue, Jul 28, 2020 at 5:22 AM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Tue, 28 Jul 2020 at 02:41, Josh Marshall via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >
> > Hello,
> >
> > I'm working on a project to implement a Hidden Markov Model and move
> > as much of it to compile time as possible.  The last part that is
> > blocking me is constexpr vector support.  What exactly might I be
> > getting myself into if I were to add this support?
>
> Adding the _GLIBCXX20_CONSTEXPR macro to every member function of
> std::vector, writing tests, seeing what breaks, and refactoring the
> code to make it work correctly.
>
> The hardest part is probably writing all the tests, to ensure that
> every member function works as part of a constant expression.
>
> There are also some legal prerequisites for contributing non-trivial
> patches to GCC, see https://gcc.gnu.org/contribute.html#legal for more
> information.

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

* Re: Adding p1004 for C++20 -- constexpr std::vector
  2020-07-28 17:58   ` Josh Marshall
@ 2020-07-28 20:54     ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2020-07-28 20:54 UTC (permalink / raw)
  To: Josh Marshall; +Cc: gcc-help

On Tue, 28 Jul 2020 at 18:58, Josh Marshall wrote:
>
> Sent out for legal forms.  I'll try to add the support here.  Can you
> tell me what I should be reading for testing, coding standards, and
> other stuff for a new contributor?

See https://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_contributing.html
and https://gcc.gnu.org/onlinedocs/libstdc++/manual/test.html

But mostly, just look at the existing files. Try to follow the local
styles in the existing headers and tests.

I recommend moving the discussion to the libstdc++@gcc.gnu.org list
where we discuss specifics of libstdc++.

Thanks for your interest in helping :-)

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

end of thread, other threads:[~2020-07-28 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  1:40 Adding p1004 for C++20 -- constexpr std::vector Josh Marshall
2020-07-28  9:22 ` Jonathan Wakely
2020-07-28 17:58   ` Josh Marshall
2020-07-28 20:54     ` Jonathan Wakely

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).