public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59141] New: [C++11] Bogus copy constructor required for direct initialization with empty variadic pack
@ 2013-11-15  0:53 ppluzhnikov at google dot com
  2015-01-20 17:48 ` [Bug c++/59141] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: ppluzhnikov at google dot com @ 2013-11-15  0:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59141

            Bug ID: 59141
           Summary: [C++11] Bogus copy constructor required for direct
                    initialization with empty variadic pack
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Possibly related to PR58940

Google ref: b/11696404

Confirmed with current trunk:
g++ (GCC) 4.9.0 20131114 (experimental)

g++ -c -std=c++11 t.cc
t.cc: In instantiation of ‘void Construct(Args ...) [with Args = {}]’:
t.cc:13:13:   required from here
t.cc:8:26: error: use of deleted function ‘NonCopyable::NonCopyable(const
NonCopyable&)’
   NonCopyable obj(args...);
                          ^
t.cc:3:3: note: declared here
   NonCopyable(const NonCopyable&) = delete;
   ^

The test:

struct NonCopyable {
  NonCopyable() {}
  NonCopyable(const NonCopyable&) = delete;
};

template <class... Args>
void Construct(Args... args) {
  NonCopyable obj(args...);
  (void)obj;
}

int main() {
  Construct();
}


There is no error if 'obj' is initialized with {args...} instead of (args...).

There is also no error if NonCopyable has a constructor from int and an int is
passed to Construct.
>From gcc-bugs-return-434651-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 15 00:55:40 2013
Return-Path: <gcc-bugs-return-434651-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7729 invoked by alias); 15 Nov 2013 00:55:39 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7256 invoked by uid 48); 15 Nov 2013 00:55:35 -0000
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58940] [C++11] Bogus "error: use of deleted function ..."
Date: Fri, 15 Nov 2013 00:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ppluzhnikov at google dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58940-4-FvX8HzLMx2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58940-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58940-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01428.txt.bz2
Content-length: 197

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX940

--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Re-confirmed with current trunk:
g++ (GCC) 4.9.0 20131114 (experimental)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/59141] [C++11] Bogus copy constructor required for direct initialization with empty variadic pack
  2013-11-15  0:53 [Bug c++/59141] New: [C++11] Bogus copy constructor required for direct initialization with empty variadic pack ppluzhnikov at google dot com
@ 2015-01-20 17:48 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-20 17:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59141

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Dup.

*** This bug has been marked as a duplicate of bug 58089 ***


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-20 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15  0:53 [Bug c++/59141] New: [C++11] Bogus copy constructor required for direct initialization with empty variadic pack ppluzhnikov at google dot com
2015-01-20 17:48 ` [Bug c++/59141] " paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).