public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marc.glisse at normalesup dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49266] New: [C++0x] Another incomplete type regression with noexcept
Date: Thu, 02 Jun 2011 10:26:00 -0000	[thread overview]
Message-ID: <bug-49266-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: [C++0x] Another incomplete type regression with
                    noexcept
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


This is another case of noexcept specifications causing instanciations and
resulting in incomplete types (see PR c++/49107 for the first one). Reporting
against C++ instead of libstdc++ like 49107.

#include <utility>
#include <vector>

template <class Refs>
class Cell_attribute
{
    typedef typename Refs::Dart_handle           Dart_handle;
};

template < class Refs>
struct Combinatorial_map_base
{
    typedef Cell_attribute< Refs> X;
    typedef std::vector<X> Y;
    std::pair<Y,Y> m;
};

template < class Items_>
struct Combinatorial_map
: public Combinatorial_map_base< Combinatorial_map<Items_> >
{
    typedef int*       Dart_handle;
};

int main()
{
    typedef Combinatorial_map<void > Map2;
    Map2();
}



$ c++ -std=gnu++0x -Wall -c Combinatorial_map_test.cpp
Combinatorial_map_test.cpp: In instantiation of
'Cell_attribute<Combinatorial_map<void> >':
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1013:68:
  instantiated from 'constexpr const bool
std::__is_assignable_helper<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > >&,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&&>::value'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1018:12:
  instantiated from
'std::is_assignable<std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&&>'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:89:12:
  instantiated from
'std::__and_<std::is_assignable<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > >&,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&&>,
std::__is_nt_assignable_impl<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > >&,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&&> >'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1066:12:
  instantiated from
'std::is_nothrow_assignable<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > >&,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >&&>'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1097:12:
  instantiated from
'std::__is_nt_move_assignable_impl<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > >, false>'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1103:12:
  instantiated from
'std::is_nothrow_move_assignable<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > > >'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:89:12:
  instantiated from
'std::__and_<std::is_nothrow_move_assignable<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > > >,
std::is_nothrow_move_assignable<std::vector<Cell_attribute<Combinatorial_map<void>
>, std::allocator<Cell_attribute<Combinatorial_map<void> > > > > >'
/tmp/gcc/inst/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h:167:7:
  instantiated from
'std::pair<std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > >,
std::vector<Cell_attribute<Combinatorial_map<void> >,
std::allocator<Cell_attribute<Combinatorial_map<void> > > > >'
Combinatorial_map_test.cpp:15:20:   instantiated from
'Combinatorial_map_base<Combinatorial_map<void> >'
Combinatorial_map_test.cpp:19:8:   instantiated from 'Combinatorial_map<void>'
Combinatorial_map_test.cpp:28:10:   instantiated from here
Combinatorial_map_test.cpp:7:50: error: no type named 'Dart_handle' in 'struct
Combinatorial_map<void>'


             reply	other threads:[~2011-06-02 10:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 10:26 marc.glisse at normalesup dot org [this message]
2011-06-04 12:31 ` [Bug c++/49266] " paolo.carlini at oracle dot com
2011-06-04 23:43 ` jason 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-49266-4@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).