MSVC is right while GCC is wrong:
Standard(3.9/5):
Incompletely-defined object types and the void types are incomplete types
Standard(20.7.1.1.2/4):
If T is an incomplete type, the program is ill-formed
More Related Contents:
- Is std::unique_ptr required to know the full definition of T?
- Proper way to create unique_ptr that holds an allocated array
- Is gcc 4.8 or earlier buggy about regular expressions?
- Is cout synchronized/thread-safe?
- Is there any use for unique_ptr with array?
- Copy constructor for a class with unique_ptr
- C++11 aggregate initialization for classes with non-static member initializers
- constexpr and initialization of a static const void pointer with reinterpret cast, which compiler is right?
- Can I use C++11 with Xcode?
- when g++ static link pthread, cause Segmentation fault, why?
- 😃 (and other Unicode characters) in identifiers not allowed by g++
- Order of evaluation of elements in list-initialization
- Using member variable in lambda capture list inside a member function
- When is it necessary to use the flag -stdlib=libstdc++?
- What are the differences between -std=c++11 and -std=gnu++11?
- std::unique_ptr, deleters and the Win32 API
- C++11: How to alias a function? [duplicate]
- std::auto_ptr to std::unique_ptr
- How does the custom deleter of std::unique_ptr work?
- How can I pass std::unique_ptr into a function
- How to update GCC in MinGW on Windows?
- When will Gnu C++ support C++11 without explicitly asking for it?
- shared_ptr is to weak_ptr as unique_ptr is to… what?
- Raw pointer lookup for sets of unique_ptrs
- Why can I call a non-constexpr function inside a constexpr function?
- The implementation of random_device in VS2010?
- gcc can compile a variadic template while clang cannot
- GCC std::thread not found in namespace std
- Is there a way to write make_unique() in VS2012?
- How to assert if a std::mutex is locked?