Intel C++ Compiler 16.0 beta with C++14 support
The Intel compiler is getting up to date:
Intel C++ Compiler 16.0 beta with C++14 support
From the article:
Intel® Parallel Studio XE 2016 Beta program has begun...
By Adrien Hamelin | Apr 14, 2015 12:14 PM | Tags: c++14
The Intel compiler is getting up to date:
Intel C++ Compiler 16.0 beta with C++14 support
From the article:
Intel® Parallel Studio XE 2016 Beta program has begun...
By Adrien Hamelin | Apr 14, 2015 11:21 AM | Tags: community c++11
In case you missed it, an interesting data point about how much programmers appreciate the improvements in C++11 (and 14) compared to C++98. As Stroustrup frequently says, C++11 feel like a new language. Note “love” means in the sense of “enjoy programming in”… more people are willing to say they enjoy programming in modern C++, and C++11 truly was a turning point and progress is continuing:
C++11 is the second "most loved" language/technology on StackOverflow according to the survey
By Adrien Hamelin | Apr 14, 2015 11:15 AM | Tags: c++11 boost
Quick A: Yes. Start with boost::irange
.
Recently on SO:
Can I do something like range-for with a counting loop?
Actually this are two related questions.
I know there is new syntax in C++11 for range based for loops of the form:
//v is some container for(auto &i: v){ // do something with i }First question: how can I infer at which iteration I am in this loop? (Say I want to fill a vector with value j at position j).
Second question: I wanted to now if there also is some other way to write a loop of the form
for(int i=0; i<100; i++){ ... }I find this way of writing it a bit cumbersome and I do this so often and I would love to have a more concise syntax for it. Something along the lines:
for(i in [0..99]){ ... }would be great.
For both questions I would like to avoid having to use additional libraries.
By Blog Staff | Apr 14, 2015 09:02 AM | Tags: None
The 2015-04 mailing of new standards papers is now available.
NOTE: A number of these papers have already been publicized on this blog. This is the complete list including ones not previously publicized.
WG21 Number | Title | Author | Document Date | Mailing Date | Previous Version | Subgroup | Disposition |
---|---|---|---|---|---|---|---|
N4381 | Suggested Design for Customization Points | Eric Niebler | 2015-03-11 | 2015-04 | Library | ||
N4382 | Working Draft, C++ extensions for Ranges | Eric Niebler | 2015-04-12 | 2015-04 | Library | ||
N4383 | C++ Standard Library Active Issues List (Revision R92) | Marshall Clow | 2015-04-10 | 2015-04 | Library | ||
N4384 | C++ Standard Library Defect Report List (Revision R92) | Marshall Clow | 2015-04-10 | 2015-04 | Library | ||
N4385 | C++ Standard Library Closed Issues List (Revision R92) | Marshall Clow | 2015-04-10 | 2015-04 | Library | ||
N4386 | Unspecialized std::tuple_size should be defined | Nevin Liber | 2015-02-24 | 2015-04 | Library | ||
N4387 | Improving pair and tuple, revision 3 | Daniel Krügler, Geoffrey Romer, Ville Voutilainen | 2015-03-14 | 2015-04 | N4064 | Library | |
N4388 | A Proposal to Add a Const-Propagating Wrapper to the Standard Library | Jonathan Coe, Robert Mill | 2015-02-25 | 2015-04 | N4372 | Library | |
N4389 | Wording for bool_constant, revision 1 | Zhihao Yuan | 2015-02-23 | 2015-04 | N4334 | Library | |
N4390 | Minimal incomplete type support for standard containers, revision 3 | Zhihao Yuan | 2015-02-24 | 2015-04 | N4371 | Library | |
N4391 | make_array, revision 4 | Zhihao Yuan | 2015-02-26 | 2015-04 | N4315 | Library | |
N4392 | C++ Latches and Barriers | Alasdair Mackintosh, Olivier Giroux | 2015-03-03 | 2015-04 | N4204 | Library | |
N4393 | Noop Constructors and Destructors | Pablo Halpern | 2015-04-10 | 2015-04 | Evolution | ||
N4394 | Agenda for Lenexa Meeting | Clark Nelson | 2015-03-12 | 2015-04 | |||
N4395 | SIMD Types: ABI Considerations | Matthias Kretz | 2015-04-10 | 2015-04 | Concurrency/Library | ||
N4396 | National Body Comments: PDTS 19841, Transactional Memory | Barry Hedquist | 2015-03-16 | 2015-04 | Transactional Memory | ||
N4397 | A low-level API for stackful coroutines | Oliver Kowalke | 2015-04-09 | 2015-04 | N3985 | Concurrency | |
N4398 | A unified syntax for stackless and stackful coroutines | Oliver Kowalke | 2015-04-09 | 2015-04 | Concurrency | ||
N4399 | Proposed Working Draft, Technical Specification for C++ Extensions for Concurrency | Artur Laksberg | 2015-04-10 | 2015-04 | N4107 | Concurrency | |
N4400 | Concurrency TS Editor's Report, May 2015 | Artur Laksberg | 2015-04-10 | 2015-04 | Concurrency | ||
N4401 | Defaulted comparison operator semantics should be uniform | Michael Price | 2015-04-07 | 2015-04 | Evolution | ||
N4402 | Resumable Functions (revision 4) | Gor Nishanov | missing | Evolution | |||
N4403 | Draft Wording for Resumable Functions | Gor Nishanov | missing | Evolution | |||
N4404 | Extension to aggregate initialization | Oleg Smolsky | 2015-03-31 | 2015-04 | Evolution | ||
N4405 | Type of the accumulaters of standard algorithms std::accumulate and std::inner_product | Vladimir Grigoriev | 2015-02-11 | 2015-04 | Library Evolution | ||
N4406 | Integrating Executors with Parallel Algorithm Execution | Jared Hoberock, Michael Garland, Oliver Giroux | 2015-04-10 | 2015-04 | Concurrency | ||
N4407 | Working Draft, Technical Specification for C++ Extensions for Parallelism | Jared Hoberock | 2015-04-10 | 2015-04 | Concurrency | ||
N4408 | Parallelism TS Editor's Report | Jared Hoberock | 2015-04-10 | 2015-04 | Concurrency | ||
N4409 | Programming Languages -- Technical Specification for C++ Extensions for Parallelism | Jared Hoberock | 2015-04-10 | 2015-04 | Concurrency | ||
N4410 | Responses to PDTS comments on Transactional Memory | Jens Maurer | 2015-04-09 | 2015-04 | Transactional Memory | ||
N4411 | Task Block (formerly Task Region) R4 | Pablo Halpern, Arch Robison, Hong Hong, Artur Laksberg, Gor Nishanov, Herb Sutter | 2015-04-10 | 2015-04 | Library Evolution, Concurrency | ||
N4412 | Shortcomings of iostreams | Jens Maurer | 2015-04-09 | 2015-04 | Library | ||
N4413 | Constexpr Lambas | Faisal Vali | missing | Evolution | |||
N4414 | Executors and Schedulers Revision 5 | Chris Mysen | 2015-04-10 | 2015-04 | N4143 | Concurrency | |
N4415 | Simple Contracts for C++ | Gabriel Dos Reis, J. Daniel Garcia, Francesco Logozzo, Manuel Fahndrich, Shuvendu Lahri | 2015-04-12 | 2015-04 | Evolution | ||
N4416 | Don't Move: Vector Can Have Your Non-Moveable Types Covered | Nevin Liber | 2015-04-09 | 2015-04 | Library Evolution | ||
N4417 | Source-Code Information Capture | Robert Douglas | 2015-04-08 | 2015-04 | N4129 | Reflection | |
N4418 | Parameter Stringization | Robert Douglas | 2015-04-08 | 2015-04 | Reflection | ||
N4419 | Potential extensions to Source-Code Information Capture | Robert Douglas | 2015-04-08 | 2015-04 | Reflection | ||
N4420 | Defining Test Code | Robert Douglas | 2015-04-08 | 2015-04 | Reflection | ||
N4421 | Evolution Active Issues List (Revision R11) | Ville Voutilainen | 2015-04-10 | 2015-04 | |||
N4422 | Evolution Completed Issues List (Revision R11) | Ville Voutilainen | 2015-04-10 | 2015-04 | |||
N4423 | Evolution Closed Issues List (Revision R11) | Ville Voutilainen | 2015-04-10 | 2015-04 | |||
N4424 | Inline Variables | Hal Finkel, Richard Smith | 2015-04-07 | 2015-04 | Evolution | ||
N4425 | Generalized Dynamic Assumptions | Hal Finkel | 2015-04-07 | 2015-04 | Evolution | ||
N4426 | Adding [nothrow-] swappable traits | Daniel Krügler | 2015-04-10 | 2015-04 | Library | ||
N4427 | Agenda and Meeting Notice for WG21 Pre-Lenexa Telecon Meeting | Herb Sutter | 2015-04-08 | 2015-04 | |||
N4428 | Type Property Queries (rev 4) | Andrew Tomazos, Christian Kaeser | 2015-04-08 | 2015-04 | N4113 | Reflection | |
N4429 | Core issue 1941 - rewording inherited constructors | Richard Smith | 2015-04-10 | 2015-04 | Evolution | ||
N4430 | Core issue 1776 - replacement of class objects containing reference members | Richard Smith | 2015-04-10 | 2015-04 | N4303 | Core | |
N4431 | Working Draft, Standard for Programming Language C++ | Richard Smith | 2015-04-10 | 2015-04 | N4296 | ||
N4432 | Editor's Report -- Working Draft, Standard for Programming Language C++ | Richard Smith | 2015-04-10 | 2015-04 | |||
N4433 | Flexible static_assert messages | Michael Price | 2015-04-09 | 2015-04 | Evolution | ||
N4434 | Tweaks to Streamline Concepts Lite Syntax | Walter Brown | 2015-04-10 | 2015-04 | Evolution | ||
N4435 | Proposing Contract Attributes | Walter Brown | 2015-04-09 | 2015-04 | Evolution | ||
N4436 | Proposing Standard Library Support for the C++ Detection Idiom | Walter Brown | 2015-04-09 | 2015-04 | Library Evolution | ||
N4437 | Conditionally-supported Special Math Functions, v3 | Walter Brown | 2015-04-09 | 2015-04 | N3743 | Library Evolution | |
N4438 | Industrial Experience with Transactional Memory at Wyatt Technologies. | Brett Hall | 2015-04-09 | 2015-04 | Transactional Memory | ||
N4439 | Light-Weight Execution Agents Revision 3 | Torvald Riegel | 2015-04-10 | 2015-04 | N4156 | Concurrency | |
N4440 | Feature-testing recommendations for C++ | Clark Nelson | 2014-04-10 | 2015-04 | N4200 | Feature Testing | |
N4441 | SG5: Transactional Memory (TM) Meeting Minutes 2015-03-23 and 2015-04-06 | Michael Wong | 2015-04-10 | 2015-04 | Transactional Memory | ||
N4442 | Default argument for second parameter of std::advance (Rev. 1) | Vladimir Grigoriev | 2015-04-09 | 2015-04 | N4369 | Library Evolution | |
N4443 | Introducing alias size_type for type size_t in class std::bitset (Rev. 1 ) | Vladimir Grigoriev | 2015-04-09 | 2015-04 | N4368 | Library Evolution | |
N4444 | Linux-Kernel Memory Model | Paul E. McKenney | 2015-04-10 | 2015-04 | N4374 | Concurrency | |
N4445 | Overly attached promise | Agustín Bergé, Hartmut Kaiser | 2015-04-09 | 2015-04 | Concurrency | ||
N4446 | The missing INVOKE related trait | Agustín Bergé | 2015-04-09 | 2015-04 | Library Evolution | ||
N4447 | From a type T, gather members name and type information, via variadic template expansion | Cleiton Santoia Silva, Daniel Auresco | 2015-04-10 | 2015-04 | N3987 | Reflection | |
N4448 | Rounding and Overflow in C++ | Lawrence Crowl | 2015-04-12 | 2015-04 | Library Evolution | ||
N4449 | Message Digest Library for C++ | Zhihao Yuan | 2015-04-09 | 2015-04 | Library Evolution | ||
N4450 | Variant: a typesafe union (v2) | Axel Naumann | 2015-04-13 | 2015-04 | N4218 | Library Evolution | |
N4451 | Static reflection | Matúš Chochlík | 2014-04-11 | 2015-04 | N4111 | Reflection | |
N4452 | Use cases of reflection | Matúš Chochlík | 2014-04-11 | 2015-04 | Reflection | ||
N4453 | Resumable Expressions | Christopher Kohlhoff | 2015-04-12 | 2015-04 | Evolution | ||
N4454 | SIMD Types Example: Matrix Multiplication | Matthias Kretz | 2015-04-10 | 2015-04 | Concurrency | ||
N4455 | No Sane Compiler Would Optimize Atomics | JF Bastien | 2015-04-10 | 2015-04 | Concurrency | ||
N4456 | Towards improved support for games, graphics, real-time, low latency, embedded systems | Michael Wong | 2015-04-12 | 2015-04 | Evolution | ||
N4457 | C++ Standard Core Language Active Issues, Revision 93 | William M. Miller | 2015-04-13 | 2015-04 | |||
N4458 | C++ Standard Core Language Defect Reports and Accepted Issues, Revision 93 | William M. Miller | 2015-04-13 | 2015-04 | |||
N4459 | C++ Standard Core Language Closed Issues, Revision 93 | William M. Miller | 2015-04-13 | 2015-04 | |||
N4460 | LWG 2424: Atomics, mutexes and condition variables should not be trivially copyable | Ville Voutilainen | 2015-04-07 | 2015-04 | Evolution | ||
N4461 | Static if resurrected | Ville Voutilainen | 2015-04-07 | 2015-04 | Evolution | ||
N4462 | LWG 2089, Towards more perfect forwarding | Ville Voutilainen | 2015-04-07 | 2015-04 | Evolution | ||
N4463 | IO device requirements for C++ | Cleiton Santoia Silva, Daniel Auresco | 2015-04-10 | 2015-04 | I/O | ||
N4464 | Pi-calculus syntax for C++ executors | Cleiton Santoia Silva | 2015-04-10 | 2015-04 | Concurrency | ||
N4465 | A Module System for C++ (Revision 3) | Gabriel Dos Reis, Mark Hall, Gor Nishanov | 2015-04-13 | 2015-04 | Evolution | ||
N4466 | Wording for Modules | Gabriel Dos Reis | 2015-04-13 | 2015-04 | Evolution | ||
N4467 | C++ Modules: Directions and Issues | Gabriel Dos Reis | missing | Evolution | |||
N4468 | On Quantifying Memory-Allocation Strategies | John Lakos, Jeffrey Mendelsohn, Alisdair Meredith, Nathan Myers | 2015-04-11 | 2015-04 | Library Evolution | ||
N4469 | Template Argument Type Deduction | James Touton, Mike Spertus | 2015-04-10 | 2015-04 | N3601 | Evolution | |
N4470 | Variadic lock_guard | Mike Spertus | 2015-04-10 | 2015-04 | Concurrency | ||
N4471 | Template parameter deduction for constructors (Rev 2) | Mike Spertus | 2015-04-12 | 2015-04 | N3602 | Evolution | |
N4472 | consexpr goto | Ville Voutilainen | 2015-04-10 | 2015-04 | Evolution | ||
N4473 | noexcept(auto), again | Ville Voutilainen | 2015-04-10 | 2015-04 | Evolution | ||
N4474 | Unified Call Syntax: x.f(y) and f(x,y) | Bjarne Stroustrup, Herb Sutter | 2015-04-12 | 2015-04 | Evolution | ||
N4475 | Default comparisons (R2) | Bjarne Stroustrup | 2015-04-09 | 2015-04 | N4175 | Evolution | |
N4476 | Thoughts about Comparisons (R2) | Bjarne Stroustrup | 2015-04-09 | 2015-04 | Evolution | ||
N4477 | Operator Dot (R2) | Bjarne Stroustrup, Gabriel Dos Reis | 2015-04-09 | 2015-04 | N4173 | Evolution | |
N4478 | Networking Library Proposal (Revision 5 | Christopher Kohlhoff | 2015-04-13 | 2015-04 | N4370 | Library Evoution | |
N4479 | Merge Fundamentals V1 into v2 | Jeffrey Yasskin | 2015-04-12 | 2015-04 | Library Evoution | ||
N4480 | Programming Languages -- C++ Extensions for Library Fundamentals DTS | Jeffrey Yasskin | 2015-04-07 | 2015-04 | |||
N4481 | Working Draft, C++ Extensions for Library Fundamentals, Version 2 | Jeffrey Yasskin | 2015-04-12 | 2015-04 | N4336 | Library Evolution | |
N4482 | Some notes on executors and the Networking Library Proposal | Christopher Kohlhoff | 2015-04-13 | 2015-04 | Concurrency |
By Adrien Hamelin | Apr 13, 2015 09:58 AM | Tags: c++11 basics
Quick A: The "= default
" keeps the type trivial.
Recently on SO:
How is “=default” different from “{}” for default constructor and destructor?
I originally posted this as a question only about destructors, but now I'm adding consideration of the default constructor. Here's the original question:
If I want to give my class a destructor that is virtual, but is otherwise the same as what the compiler would generate, I can use
=default
:class Widget { public: virtual ~Widget() = default; };But it seems that I can get the same effect with less typing using an empty definition:
class Widget { public: virtual ~Widget() {} };Is there any way in which these two definitions behave differently?
Based on the replies posted for this question, the situation for the default constructor seems similar. Given that there is almost no difference in meaning between "
=default
" and "{}
" for destructors, is there similarly almost no difference in meaning between these options for default constructors? That is, assuming I want to create a type where the objects of that type will be both created and destroyed, why would I want to sayWidget() = default;instead of
Widget() {}
?
I apologize if extending this question after its original posting is violating some SO rules. Posting an almost-identical question for default constructors struck me as the less desirable option.
By Adrien Hamelin | Apr 13, 2015 09:52 AM | Tags: community boost
Come see a nice product review:
Boost.Spirit + Flatbuffers + Catch + Biicode + CLion + Github
by Max Galkin
From the article:
This weekend I’m test-driving several new technologies. OK, OK, maybe not so new for everyone else, but new for me. I’m trying to write a parser for the Flatbuffers IDL grammar using Boost.Spirit, I’m referencing Boost using Biicode, I’m testing the code using Catch, I’m editing the project in CLion, and I’m pushing the results to Github yacoder/flatbuffers-with-spirit!
By Jon Kalb | Apr 13, 2015 01:38 AM | Tags: None
Oral History of Bjarne Stroustrup
About the interview:
In a substantial interview with Paul McJones, Bjarne Stroustrup discusses his youth, his education at the Aarhus University and the University of Cambridge, and his career at AT&T Bell Laboratories, Texas A&M University, and Morgan Stanley. Also covered are his early experience with a variety of programming languages including Simula and BCPL. Finally, the interview focuses on his work on C++ and its predecessor C with Classes, including his goal of combining good abstraction mechanisms with direct access to the hardware. Specific language features discussed include value semantics, templates, concepts, the Standard Template Library, and highlights of the C++11 and C++14 standards.
By Adrien Hamelin | Apr 12, 2015 09:47 AM | Tags: performance efficiency
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Pragmatic Type Erasure: Solving OOP Problems w/ Elegant Design Pattern
by Zach Laine
Summary of the talk:
There are numerous, serious OOP design problems that we have all encountered in production code. These include, among others: - object lifetime/ownership - how to make classes from different class hierarchies conform to a common interface - writing classes that can present multiple interfaces - separating interface and implementation - how to write virtual functions so that subclasses override them properly - the virtual inheritance "diamond of death"
Proper use of type erasure can mitigate, or outright eliminate, these and other problems, without sacrificing performance.
This talk will cover the OOP design problems above and more, and will cover hand-rolled and library-based type erasure approaches that solve those problems. Performance metrics will be provided for the different approaches, and source code will be available after the talk.
By Adrien Hamelin | Apr 10, 2015 08:00 AM | Tags: c++11
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Embind and Emscripten: Blending C++11, JavaScript, and the Web Browser
by Chad Austin
Summary of the talk:
Emscripten compiles C or C++ source code into JavaScript so it can run in a web browser. Emscripten is commonly used to port games to the web with no download or plugin required.
Embind is a C++11 binding library that makes it easy to expose libraries written in C++ to JavaScript. This allows JavaScript applications to take advantage of existing bodies of C++ code. In addition, C++ compiled into the asm.js subset of JavaScript is often faster than hand-written JavaScript, so Embind makes it convenient to accelerate JavaScript applications by writing high-performance functionality in C++.
With several motivating examples, this lecture will cover the design of embind, how variadic templates and constexpr facilitate interesting optimizations, and how embind minimizes its impact on the size of the generated JavaScript.
By robwirving | Apr 10, 2015 05:12 AM | Tags: None
Episode 7 of CppCast the only podcast by C++ developers for C++ developers. In this episode Vittorio Romeo joins Rob Irving to talk about making simple games with C++ using libraries like SFML, SDL and Cinder.
CppCast Episode 7: Quick Game Development with Vittorio Romeo
by Rob Irving
About the interviewee:
Vittorio Romeo is an undergraduate Computer Science student at "Università degli Studi di Messina". Since childhood he has always been interested in programming, and learned to develop applications and games as an autodidact. After discovering C++ a few years ago, Vittorio became extremely passionate about its evolution and its community. He currently works on open-source general-purpose C++14 libraries and develops free open-source games. Vittorio also loves teaching: he manages a well-received C++11/C++14 video tutorial series and he talked about game development in C++ at CppCon 2014. When he's not in front of a computer, Vittorio enjoys fitness activities (weightlifting, swimming, running) and reading.