Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: How to enable C++1y in a project?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Apr 24, 2018 4:46 AM Last Post By: Greg Reese Threads: [ Previous | Next ]
Ville-Valtteri ...

Posts: 13
Registered: 6/18/15
How to enable C++1y in a project?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 23, 2018 4:49 AM
I want to enable C++1y in a project that has both C++ and C files. I am using BCC32C, which supports C++1y.

I can put "-std=c++1y" to "Additional options to pass to compiler". If I only had C++ files, this would work. But in my case this option is used for C files too, resulting to compile error. I cannot enable "Force C++ compile", because I use SQLite and it relies on many C features.

If I modify Codegear.Cpp.Targets, and replace CLANG_LanguageStandard "c++11" with "c++1y", everything compiles correctly in C++1y. But I would have to modify this file on every developer's computer, because it's an internal configuration file.

Is there a way to enable C++1y via project file somehow? I tried to set CLANG_LanguageStandard in project file, but this value is not used in Codegear.Cpp.Targets, so the project is compiled in C++11.
Greg Reese

Posts: 100
Registered: 7/15/05
Re: How to enable C++1y in a project?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 23, 2018 9:10 AM   in response to: Ville-Valtteri ... in response to: Ville-Valtteri ...
Ville-Valtteri Tiittanen wrote:
Is there a way to enable C++1y via project file somehow? I tried to set CLANG_LanguageStandard in project file, but this value is not used in Codegear.Cpp.Targets, so the project is compiled in C++11.

In the IDE, go to Project | Options. In the Target field, select "All configurations - 32-bit Windows platform". On the left pane, select C++ Compiler and under Classic Compiler, uncheck Use 'classic' Borland compiler . This will make the project use the CLANG compiler.
Ville-Valtteri ...

Posts: 13
Registered: 6/18/15
Re: How to enable C++1y in a project?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 23, 2018 11:04 PM   in response to: Greg Reese in response to: Greg Reese
Greg Reese wrote:
Ville-Valtteri Tiittanen wrote:
Is there a way to enable C++1y via project file somehow? I tried to set CLANG_LanguageStandard in project file, but this value is not used in Codegear.Cpp.Targets, so the project is compiled in C++11.

In the IDE, go to Project | Options. In the Target field, select "All configurations - 32-bit Windows platform". On the left pane, select C++ Compiler and under Classic Compiler, uncheck Use 'classic' Borland compiler . This will make the project use the CLANG compiler.

I am using CLANG compiler, but it uses C++11. I want to use C++1y (C++14).
Greg Reese

Posts: 100
Registered: 7/15/05
Re: How to enable C++1y in a project?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 24, 2018 4:46 AM   in response to: Ville-Valtteri ... in response to: Ville-Valtteri ...
I am using CLANG compiler, but it uses C++11. I want to use C++1y (C++14).
Currently, none of the Embarcadero compilers support C++14 or C++17. They are working on C++17
(see
https://community.embarcadero.com/blogs/sarina-dupont-senior-product-manager/entry/exciting-rad-studio-developments-in-2018 )
but have not announced a date for it yet.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02