[llvm-bugs] [Bug 38409] New: Initializer list {{}} for tuple<tuple<>&&> fails but succeeds for tuple<tuple<> const &>

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 1 15:58:18 PDT 2018


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

            Bug ID: 38409
           Summary: Initializer list {{}} for tuple<tuple<>&&> fails but
                    succeeds for tuple<tuple<> const &>
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: davidfink314 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20630
  --> https://bugs.llvm.org/attachment.cgi?id=20630&action=edit
program demonstrating the bug

Attempting to compile the attached file yields the following error.

Note that a temporary tuple binding to const & works (y), but it errors out
trying to bind to && (x).

This error is from Apple LLVM version 9.0.0 (clang-900.0.38),
but this is reproducible in clang (trunk) on godbolt.org.


clang_rvalue_bug.cpp:7:22: error: no matching constructor for initialization of
'tuple<tuple<> &&>'
    tuple<tuple<>&&> x{{}};
                     ^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:620:5:
note: 
      candidate constructor not viable: cannot convert initializer list
argument to 'const
      std::__1::tuple<std::__1::tuple<> &&>'
    tuple(tuple const&) = default;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:621:5:
note: 
      candidate constructor not viable: cannot convert initializer list
argument to
      'std::__1::tuple<std::__1::tuple<> &&>'
    tuple(tuple&&) = default;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:827:9:
note: 
      candidate template ignored: couldn't infer template argument '_Tuple'
        tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base,
_Tuple>::value))
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:842:9:
note: 
      candidate template ignored: couldn't infer template argument '_Tuple'
        tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base,
_Tuple>::value))
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:639:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Dummy = true]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:657:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Dummy = true]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:715:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Up = <>,
_PackIsTuple = false]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:747:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Up = <>]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:617:23:
note: 
      candidate constructor template not viable: requires 0 arguments, but 1
was provided
    _LIBCPP_CONSTEXPR tuple()
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:630:5:
note: 
      candidate constructor template not viable: requires 2 arguments, but 1
was provided
    tuple(_AllocArgT, _Alloc const& __a)
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:682:7:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
      tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:702:7:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
      tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:788:9:
note: 
      candidate constructor template not viable: requires at least 2 arguments,
but 1 was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:808:9:
note: 
      candidate constructor template not viable: requires at least 2 arguments,
but 1 was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:855:9:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:869:9:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)

-- 
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/20180801/ebcf753b/attachment-0001.html>


More information about the llvm-bugs mailing list