Skip to content

<xstring>: constexpr string does not compile with -d1initall #4473

Description

@tiagomacarios

The following code stopped compiling when d1initall is enabled.
https://godbolt.org/z/9EW3z1s5P

#include <string>

constexpr bool f() noexcept {
    std::string gate_name{"aaaaaaaaaaaaaaaaaaaaaa"};
    return true;
}

constexpr bool b = f();

Godbolt shows the regression starting in v19.38. Cameron helped me track the regression to PR 490538: Port 14 GitHub PRs: GH-3939, GH-3900, GH-3935, GH-3912, GH-3927, GH-3936, GH-3862, GH-3903, GH-3904, GH-3920, GH-3921, GH-3930, GH-3933, GH-3934.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions