Skip to content

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

@tiagomacarios

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.

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