Summary: | Template argument deduction: incomplete type ‘Eigen::internal::traits<U>’ used in nested name specifier (C++17) | ||
---|---|---|---|
Product: | Eigen | Reporter: | Marc Schmitt <schmitt.marc> |
Component: | Core - general | Assignee: | Nobody <eigen.nobody> |
Status: | RESOLVED FIXED | ||
Severity: | Compilation Problem | CC: | chtz, gael.guennebaud, jacob.benoit.1, schmitt.marc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Marc Schmitt
2019-02-06 13:31:20 UTC
Actually, we could insert this somewhere (probably guarded by some #if GCC>=6 guard): namespace boost { namespace serialization { struct U; // forward-declaration for Bug 1676 } } // boost::serialization namespace Eigen { namespace internal { // Workaround for bug 1676 template<> struct traits<boost::serialization::U> {enum {Flags=0};}; } } But this looks like an ugly hack for a very specific problem. I guess this would be justifiable, if we provided an Eigen-boost-serialization module ourself. I'll post this as a different workaround at the SO-post for now. isn't is a bug in GCC? Yes that is very likely a bug in gcc (unless there is some weird wording in the standard which nobody except gcc interprets correctly *g*). This would be a workaround for that bug. As I said, I'm not really in favor of that, either. But this bug effects lots of gcc users. On the other hand, the workaround is very easy to apply by users themselves (in case they actually use boost-serialization and use it as in the original SO-question ...) So, currently I'm tending to WONTFIX -- *maybe* add it to some FAQ (but the SO post will likely be google-able, if other users hit the same problem). Actually, I also works, if the forward declaration in boost/serialization/shared_ptr_helper.hpp: template<class Archive, template<class U> class SPT > void load( Archive & ar, SPT< class U > &t, const unsigned int file_version ); Gets replaced by a more meaningful: template<class Archive, template<class> class SPT, class U > void load( Archive & ar, SPT< U > &t, const unsigned int file_version ); Definitely not an issue which Eigen should solve ... Also here for future reference: https://github.com/boostorg/serialization/pull/144 While preparing a reduced test case: https://godbolt.org/z/uIy1Uu I found an easy and general workaround: https://bitbucket.org/eigen/eigen/commits/28ca6976ccea/ Much cleaner workaround! I guess this can also be back-ported to 3.3. done: 4a9887251746 -- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1676. |