[llvm-bugs] [Bug 40085] New: Incompatibility when inheriting MSVC's STL tuple

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 18 08:05:28 PST 2018


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

            Bug ID: 40085
           Summary: Incompatibility when inheriting MSVC's STL tuple
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gufideg at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 21246
  --> https://bugs.llvm.org/attachment.cgi?id=21246&action=edit
Compilation output containing the error

Clang is incompatible with some uses of std::tuple using the visual studio STL.
More specifically, when inheriting from it.

    struct Foo : private std::tuple<int> {
        void bar() {
            std::get<0>(*this) = 1;
        }
    };

    int main() {
        Foo f;
        f.bar();
    }

The code above compiles perfectly using GCC (libstdc++), Clang on linux
(libstdc++), and MSVC (using it's own STL).

The mix of clang and MSVC's STL result the compilation error sent as
attachement.

-- 
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/20181218/cd16fddf/attachment.html>


More information about the llvm-bugs mailing list