- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
};
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We're forwarding this case to the internal team who can help you out.
Regards
Gopika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've submitted this issue to our Developer. Will keep you updated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've had the same problem. Solved as suggested in https://github.com/taocpp/operators by
#include <utility> // make sure it's included before the following!
#define noexcept(...)
// you probably also need this for older compilers:
#define TAO_OPERATORS_CONSTEXPR
#include <tao/operators.hpp>
#undef noexcept
perhaps that provides some insight
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The version against which you reported your issue is no longer targeted for fixes. Please check out the new versions of Intel oneAPI Toolkits for the latest features.
Workaround with icpc is to remove the noexcept expression.
I am going to close this thread. If you have any questions/concerns please open a new thread.
Thanks,
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page