public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tinlyx at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/48350] make_tuple() on empty tuples does not compile
Date: Wed, 30 Mar 2011 08:04:00 -0000	[thread overview]
Message-ID: <bug-48350-4-vQdKtjnlpq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48350-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from tinlyx at gmail dot com 2011-03-30 07:28:55 UTC ---
As a matter of fact, make_tuple() cannot be used on any tuples with cardinality
other than 1. This contrasts with std::vector where we can have a vector of
vectors (e.g. a matrix).

A minimal example is listed below:

//b.cpp
#include <tuple>
using namespace std;

int main() {
  //auto te = make_tuple();     //this doesn't work
  auto te = make_tuple(1);      //this works
  //auto te = make_tuple(1,2);  //this doesn't work
  auto tte = make_tuple(te);
  return 0;
}



//////////
//The compiler error message is omitted, but I can upload it if necessary.


  reply	other threads:[~2011-03-30  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  5:33 [Bug c++/48350] New: " tinlyx at gmail dot com
2011-03-30  8:04 ` tinlyx at gmail dot com [this message]
2011-03-30 10:01 ` [Bug c++/48350] " redi at gcc dot gnu.org
2011-03-30 10:04 ` redi at gcc dot gnu.org
2011-03-30 10:51 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48350-4-vQdKtjnlpq@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).