C++14 Features Supported by Intel C++ Compiler 15.0

C++14 Features Supported by Intel C++ Compiler 15.0

This post claims some C++14 features are supported by Intel C++ 15.0 compiler:

https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler

However I couldn't get any of them to work using Intel C++ 15.0 on Windows. What gives?

 

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello Boris,

What's your specific Intel compiler version and Visual studio version? could you provide some test case to illustrate these unsupported features?

 

 

Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:

User forums:                   http://software.intel.com/en-us/forums/

Hi,

Thanks for responding.

Visual Studio 2013 Update 3.

Intel Parallel Studio XE 2015 Composer Edition (2015.0.108)

// Initialized lambda captures: simple-capture, init-capture:

void test()

{
    [a=1]{};
}

This gives an error:

1>cstring.cpp(24): error : expected a declaration
1>        [a=1]{};
1>             ^

// decltype(auto), return type deduction for normal functions:

void test2()
{
    decltype(auto) i = 5;
}

This gives an error:

1>cstring.cpp(24): error : expected a type specifier
1>        decltype(auto) i = 5;
1>        ^

Hello Martin,

   I have reproduced as you said and will enter this issue into our problem-tracking database.Thank you for submitting the issue.I'll get this posted whenever I have an update from our development team.

Thank you.
--
QIAOMINQ.
Intel Developer Support

I don't think these are C++11 related bugs.

The two code snippets I provided are using C++14 features.

Which Intel C++ 15.0 lists as supported here: https://software.intel.com/en-us/articles/c14-features-supported-by-inte...

Perhaps the bug is that in Intel C++ 15.0 compiler C++14 support is mistakenly disabled (only on Windows)?

 

Hello Boris,

  This is a C++14 unsupported feature of compiler front end. I got a workaround for you.

Assign the lambda to a temporary variable and then call it, i.e.

void test()
{
   auto foo= [a = 1]{};
   foo();
}
 

  Hope that helps for now. I'll get this posted whenever I have an update from our development team.

Thank you.
--
QIAOMINQ.
Intel Developer Support

 

 

QIAOMINQ,

The code you provided doesn't compile either.

But I think you are missing the whole point anyway.

Intel documentation here says these C++14 features are supported:

https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler

Is the documentation wrong, or do I need to specify some flag to enable support for these C++14 features?

Boris.

 

Hi Boris,

I was informed that this issue has been addessed in Composer XE 2015 Update 3, which could be downloaded in <https://registrationcenter.intel.com>.  I’m closing this issue now.  Please feel free to reopen it or create a new issue if the problem still persists in Update 3.

Thank you for your issue submission.

 

Boris,

In order to use the new c++14 features on Linux you need to specify the -std=c++14 switch (just like with GNU can Clang).

Judy

On windows one will need to use /Qstd:c++14 instate of /Qstd=c++11 .
Please note that : is used instate of = .

Leave a Comment

Please sign in to add a comment. Not a member? Join today