https://llvm.org/bugs/show_bug.cgi?id=26076
Bug ID: 26076 Summary: dllexport vs template instantiation, nested class, and in-class initialization Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: h...@chromium.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified >From crbug.com/575700: struct LayerSelectionBound; template <typename> struct Selection {}; typedef Selection<LayerSelectionBound> LayerSelection; struct LayerImpl; struct __declspec(dllexport) LayerTreeImpl { struct __declspec(dllexport) ElementLayers { LayerImpl *main = nullptr; }; LayerSelection foo; }; $ bin/clang -target i686-pc-win32 -c /tmp/a.cc /tmp/a.cc:8:16: error: cannot use defaulted default constructor of 'ElementLayers' within 'LayerTreeImpl' outside of member functions because 'main' has an initializer LayerImpl *main = nullptr; ^ /tmp/a.cc:10:18: note: in instantiation of template class 'Selection<LayerSelectionBound>' requested here LayerSelection foo; ^ /tmp/a.cc:7:32: note: implicit default constructor for 'LayerTreeImpl::ElementLayers' first required here struct __declspec(dllexport) ElementLayers { ^ /tmp/a.cc:7:21: note: due to 'ElementLayers' being dllexported struct __declspec(dllexport) ElementLayers { ^ 1 error generated. PR23542 was the bug for dllexport vs in-class initializers in general. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs