- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having a problem compiling the attached code (which reimplements something like C++14's integer_sequence).
I've attempted compiling with "icpc --std=c++11 (using g++ 4.8.1's libstdc++)", but the compiler refuses to then find and instantiate the templated function. When I remove the "type indirection" (from TH::Indices<...> to TH::THDetail::integer_sequence<unsigned, ...>) then the code compiles.
Both clang 3.3 and g++ 4.8.1 compile this example just fine.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
I have been able to reproduce this and have entered it as DPD200252873 in our internal bug tracking database.
This looks like a problem with variadic templates used as template aliases -- here is a workaround (inside the #ifdef OK) which avoids the problem:
template<unsigned ...Is>
static void testFunc
#ifdef OK
(typename TH::THDetail::integer_sequence<unsigned, Is ...>)
#else
(TH::Indices<Is ...>)
#endif
Thanks for reporting it and we will get this fixed as soon as possible.
Judy

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