- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think I found a bug in the newest release of the Intel Compiler (Composer XE 2013 SP1 Update 1) on Windows; Namely the following code doesn't compile:
[cpp]
#include<vector>
void f()
{
std::vector<int> v;
decltype(v)::iterator i;
}
int main()
{
return 0;
}
[/cpp]
This code compiles succesfully with Visual C++, Clang 3.3 (on Linux) and gcc 4.8.2 (on linux).
Raffael
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes this is something we just recently implemented in our development compiler.
This is the description of the change:
10/15/13
C++11: decltype allowed in nested-name-specifiers and destructor calls
The resolution of core issue 743, described in n3049, allowing decltype(expr)
to be used in a nested-name-specifier or following "~" in a destructor name is
now implemented.
template <class T> struct A {
struct B {};
};
template <class T> inline void f(T t) {
typename decltype(t)::B b;
T *p = new T();
p->~decltype(t)();
}
int main() {
A<int> a;
f(a);
}
Sorry for the inconvenience.
Judy

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