[llvm-bugs] [Bug 30961] New: Error when initializing an boost::optional with std::tuple

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 9 07:18:58 PST 2016


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

            Bug ID: 30961
           Summary: Error when initializing an boost::optional with
                    std::tuple
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: akrzemi1 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following program fails to compile in clang 3.8 and 3.7, with Boost 1.61 or
1.62, with -std=c++14 -stdlib=libc++ :

```
#include <boost/optional.hpp>
#include <tuple>

using Tup = std::tuple<boost::optional<int>>;
const Tup x;
boost::optional<Tup> y = x;

int main() {}
```

See here:
http://melpon.org/wandbox/permlink/j9ZiYms0x3L9hIuF

It starts to compile when I change to GCC, or when I change the standard to
-std=c++11.

For some reason, it fails so see the optional<T> constructor taking T const& is
not picked. However the diagnostic messages give no hint why this is so.

-- 
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/20161109/2b941c93/attachment.html>


More information about the llvm-bugs mailing list