https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103294

            Bug ID: 103294
           Summary: constexpr std::string does not work for clang
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Created attachment 51820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51820&action=edit
error message from clang

#include<string>
#include<cassert>

constexpr bool foo()
{
        std::string str2{"abcwe"};
        return str2.size()==5;
}

static_assert(foo());

int main()
{
        assert(foo());
}

Reply via email to