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

            Bug ID: 88888
           Summary: Cannot construct filesystem::path from variable length
                    array
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

// { dg-options "-std=gnu++17" }
#include <filesystem>
int main()
{
  int i = 2;
  char vla[i] = {};
  std::filesystem::path p = vla;
}


p.cc: In function 'int main()':
p.cc:7:29: error: conversion from 'char [i]' to non-scalar type
'std::filesystem::__cxx11::path' requested
    7 |   std::filesystem::path p = vla;
      |                             ^~~

Reply via email to