This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50361] [C++0x] [4.7 Regression] ICE with std::initializer_list nullptr


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[C++0x] [4.7 Regression]    |[C++0x] [4.7 Regression]
                   |ICE probably relating to    |ICE with
                   |std::initializer_list and   |std::initializer_list
                   |template argument deduction |nullptr

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-12 12:08:20 UTC ---
This is enough:

#include <initializer_list>

struct Foo
{
  Foo(std::initializer_list<Foo>) { };

  template<class T> Foo(T t) { T u(t); };

private:
  union Data
  {
    Data() : null(nullptr) {}

    std::nullptr_t null;
  } u_;
};

int main()
{
  Foo f = { {} };
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]