Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AndrewC
New Contributor I
106 Views

19.1 compiler incomplete type is not allowed

I am trying to use the useful C++ header library from GitHub

https://github.com/taocpp/operators

This sample code compiles with Visual Studio 2019 16.7 compilers, but Intel 19.1 fails with "incomplete type is not allowed". Any suggestions for getting this to compile. I am using C++17 language.

#include <tao/operators.hpp>

class MyInt
  : tao::operators::commutative_addable< MyInt >,
    tao::operators::multipliable< MyInt, double >
{
public:
  // create a new instance of MyInt
  MyInt( const int v ) noexcept;

  // copy and move constructor
  MyInt( const MyInt& v ) noexcept;
  MyInt( MyInt&& v ) noexcept; // optional

  // copy and move assignment
  MyInt& operator=( const MyInt& v ) noexcept;
  MyInt& operator=( MyInt&& v ) noexcept; // optional

  // addition of another MyInt
  MyInt& operator+=( const MyInt& v ) noexcept;
  MyInt& operator+=( MyInt&& v ) noexcept; // optional

  // multiplication by a scalar
  MyInt& operator*=( const double v ) noexcept;
};

 

0 Kudos
3 Replies
Gopika_Intel
Moderator
75 Views

Hi,

 

Thank you for posting in Intel C++ Compiler forum. Sorry for the delay in response. We were able to reproduce the issue. We’ll get back to you about the possible explanation of the error.

 

Regards

Gopika


Gopika_Intel
Moderator
62 Views

Hi,


We're forwarding this case to the internal team who can help you out.


Regards

Gopika


Viet_H_Intel
Moderator
52 Views

I've submitted this issue to our Developer. Will keep you updated.

Thanks