- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I think I've found two bugs in icpc 13.0.0.0.
This is illustrated by the following program compiled with "icpc -std=c++0x icpcbugs.cpp -o icpcbugs"
---------------------------------------------------------------------------------------
// Preprocessor
#include <iostream>
#include <type_traits>
// Annoying warning 2922 with icpc (ICC) 13.0.0 20120731
// Note: there is also the same bug with warning 488
// icpcbugs.cpp(11): warning #2922: template parameter "<unnamed>" cannot be used because it follows a parameter pack and cannot be deduced from the parameters of function template "warningbug2922"
template<typename T, class... Args, class = typename std::enable_if<std::is_fundamental<T>::value>::type>
void warningbug2922(const T& x, const Args&... args);
template<typename T, class... Args, class>
void warningbug2922(const T& x, const Args&... args)
{
std::cout<<sizeof(T)<<" "<<sizeof...(Args)<<std::endl;
}
// Compilation error with icpc (ICC) 13.0.0 20120731
// icpcbugs.cpp(32): internal error: assertion failed at: "shared/cfe/edgcpfe/il.c", line 16057
struct Test {static constexpr bool ok();};
constexpr bool Test::ok() {return true;}
template<typename T, class = typename std::enable_if<std::is_same<T, Test>::value>::type, class = typename std::enable_if<T::ok()>::type>
void assertionfailed(const T& x)
{
std::cout<<x.ok()<<std::endl;
}
// Main
int main()
{
warningbug2922(5.);
assertionfailed(Test());
return 0;
}
---------------------------------------------------------------------------------------
Can you confirm these bugs ?
Will they be corrected in a next release ?
Thank you very much.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page