- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I'm trying to build Unreal Engine with Intel Compiler 17.0 but I'm getting quite interesting error. ICC complains about 'incomplete type' in multiple places. These places boil down to the following code snippet:
template <class Base> class B : public Base {}; class A { static B<A> StaticMember; // D'OH! ICC: incomplete type is not allowed };
VC++, gcc and clang compile it while ICC complains about an incomplete type. Why is this the case? What is the reason behind ICC behaviour?
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I tried with all 6 versions of 17.0, but was not able to reproduce the issue.
$ cat t.cpp
template <class Base>
class B : public Base
{};
class A
{
static B<A> StaticMember; // D'OH! ICC: incomplete type is not allowed
};
$ icpc t.cpp -c -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.5.239 Build 20170817
Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. That's weird. Also I'm trying to compile it on Windows
Source.cpp:
template <class Base> class B : public Base {}; class A { static B<A> StaticMember; // D'OH! ICC: incomplete type is not allowed }; int main() { return 0; }
And that's what I get:
Microsoft Windows [Version 10.0.16299.64] (c) 2017 Microsoft Corporation. All rights reserved. ~>"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\compilervars.bat" intel64 vs2015 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. Intel(R) Compiler 17.0 Update 4 (package 210) ~>icl Source.cpp Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.4.210 Build 20170411 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. Source.cpp Source.cpp(2): error: incomplete type is not allowed class B : public Base ^ detected during instantiation of class "B<Base> [with Base=A]" at line 7 compilation aborted for Source.cpp (code 2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, All!
I tried this code on Windows 10 and have same error:
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.0.124 Build 20170811 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. test.cpp test.cpp(2): error: incomplete type is not allowed class B : public Base ^ detected during instantiation of class "B<Base> [with Base=A]" at line 7 compilation aborted for test.cpp (code 2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel support, could you check issue on windows platform?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page