[llvm-bugs] [Bug 31623] New: Regression in std::vector initialization in clang++ 3.9.x

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 12 16:32:27 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31623

            Bug ID: 31623
           Summary: Regression in std::vector initialization in clang++
                    3.9.x
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dane at mapbox.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

clang 3.9.0 and 3.9.1 refuse to compile code that worked in 3.8.1:

```
#include <mapbox/geometry/polygon.hpp>

int main() {
    mapbox::geometry::polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, {
45, 45 }, { 45, 0 } }} }};
}
```

mapbox/geometry/polygon.hpp can be found here:
https://github.com/mapbox/geometry.hpp/blob/master/include/mapbox/geometry/polygon.hpp

That errors with: `error: no matching constructor for initialization of 'const
mapbox::geometry::linear_ring<double, std::vector>'.

However this works:

```
Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170113/2b81de80/attachment.html>


More information about the llvm-bugs mailing list