http://llvm.org/bugs/show_bug.cgi?id=16801

Howard Hinnant <[email protected]> changed:

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

--- Comment #1 from Howard Hinnant <[email protected]> ---
This is a duplicate of 13471.  The mmap is still being instantiated with
incomplete type c at:

    typename mmap::iterator i_;

Implementations of map, including libc++ in C++03 mode, go to extra lengths to
try to allow this code as an extension.  However the addition of noexcept throw
specs to various members make such extensions increasingly difficult, if not
impossible.

It is because the noexcept specs are #ifdef'd out in C++03 mode that allows
libc++ to swallow this in C++03 mode.

You could try this instead:

template <typename K, typename V>
struct C
{
  struct c;
  typedef std::map<K, c> mmap;

  struct c
  {
    V                       v_;
    std::pair<const K, c>*  i_;
  };

  mmap m_;
};

int main()
{
  C<char, int> cc;

  return 0;
}

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to