Repository navigation
Supported Features
Listed below is a non-comprehensive and possibly out-of-date list of supported C++ features:
| Feature | C++17 | C++14 | C++11 | Partial support explanation |
|---|---|---|---|---|
| Primitive types | ||||
| Integral data types | Full ✅ | Full ✅ | Full ✅ | |
| Boolean data types | Full ✅ | Full ✅ | Full ✅ | |
| Arrays | Full ✅ | Full ✅ | Full ✅ | |
lvalue references |
Full ✅ | Full ✅ | Full ✅ | |
rvalue references |
Full ✅ | Full ✅ | Full ✅ | |
| Pointers | Full ✅ | Full ✅ | Full ✅ | |
| Floating-point data types | None ❌ | None ❌ | None ❌ | |
| Function types | None ❌ | None ❌ | None ❌ | |
decltype |
Partial |
Partial |
Full ✅ |
decltype(auto) is not supported |
auto |
Full ✅ | Full ✅ | Full ✅ | |
| Bit-fields | None ❌ | None ❌ | None ❌ | |
| Expressions | ||||
| C-style casts | Partial |
Partial |
Partial |
Pointers cannot be converted to/from integral types |
static_cast |
Partial |
Partial |
Partial |
Pointers cannot be converted to/from integral types |
const_cast |
Partial |
Partial |
Partial |
Pointers cannot be converted to/from integral types |
reinterpret_cast |
None ❌ | None ❌ | None ❌ | |
dynamic_cast |
None ❌ | None ❌ | None ❌ | |
typeid |
None ❌ | None ❌ | None ❌ | |
sizeof |
Full ✅ | Full ✅ | Full ✅ | |
alignof |
None ❌ | None ❌ | None ❌ | |
| Arithmetic operators | Full ✅ | Full ✅ | Full ✅ | |
| Bitwise operators | Full ✅ | Full ✅ | Full ✅ | |
| Boolean operators | Full ✅ | Full ✅ | Full ✅ | |
| Ternary expressions | Full ✅ | Full ✅ | Full ✅ | |
new/delete
|
None ❌ | None ❌ | None ❌ | |
noexcept |
None ❌ | None ❌ | None ❌ | |
| Pointer-to-member operators | None ❌ | None ❌ | None ❌ | |
| Lambda functions | None ❌ | None ❌ | None ❌ | |
| Fold expressions | None ❌ | DNE ➖ | DNE ➖ | |
| Statements | ||||
| Labels | Full ✅ | Full ✅ | Full ✅ | |
for loops |
Full ✅ | Full ✅ | Full ✅ | |
if statements |
Partial |
Full ✅ | Full ✅ | Separate initializers from conditions are not supported |
switch statements |
Partial |
Partial |
Partial |
Switch statements introduce scopes for each case label implicitly |
while loops |
Full ✅ | Full ✅ | Full ✅ | |
Range-based for loops |
Partial |
Partial |
Partial |
Only pointer-based iterators are supported |
do/while loops |
Partial |
Partial |
Partial |
Early exit via break is not supported |
break |
Full ✅ | Full ✅ | Full ✅ | |
continue |
None ❌ | None ❌ | None ❌ | |
return |
Full ✅ | Full ✅ | Full ✅ | |
goto |
None ❌ | None ❌ | None ❌ | |
| Declarations | ||||
| Functions | Partial |
Partial |
Partial |
Variadic functions are not supported |
| Classes/structs | Partial |
Partial |
Partial |
See below on inheritance |
| Unions | None ❌ | None ❌ | None ❌ | |
| Enumerations | Full ✅ | Full ✅ | Full ✅ | |
| Inheritance | Partial |
Partial |
Partial |
Only single, non-virtual inheritance is supported |
| Namespaces | Full ✅ | Full ✅ | Full ✅ | |
| Operator overloading | Full ✅ | Full ✅ | Full ✅ | |
| Constructors | Full ✅ | Full ✅ | Full ✅ | |
| Destructors | Full ✅ | Full ✅ | Full ✅ | |
typedef |
Full ✅ | Full ✅ | Full ✅ | |
asm |
None ❌ | None ❌ | None ❌ | |
| Attributes | None ❌ | None ❌ | None ❌ | |
| Initializers | ||||
| Equals initialization | Full ✅ | Full ✅ | Full ✅ | |
| Aggregate initialization | Partial |
Partial |
Partial |
Aggregate initialization is not supported for initializing arrays |
| Structured binding | None ❌ | DNE ➖ | DNE ➖ | |
| Qualifiers | ||||
const |
Partial |
Partial |
Partial |
const class member variables are not supported |
mutable |
None ❌ | None ❌ | None ❌ | |
volatile |
Partial |
Partial |
Partial |
volatile is ignored since threading is not supported |
constexpr |
Partial |
Full ✅ | Full ✅ |
constexpr functions are not supported in C++17 |
virtual |
None ❌ | None ❌ | None ❌ | |
| Standard library | Partial |
Partial |
Partial |
See below: "Supported C++ headers" |
| Threading | None ❌ | None ❌ | None ❌ | |
| Exceptions | None ❌ | None ❌ | None ❌ | |
| Templates | Partial |
Partial |
Partial |
Template metaprogramming is not fully supported |
| Preprocessing | Full ✅ | Full ✅ | Full ✅ |
Below is a list of headers that have been verified and annotated to work with Castor.
cstdintstdint.hclimitslimits.h-
cstddef(partial support)
This software manual is released as LLNL-SM-2018190.
This document was prepared as an account of work sponsored by an agency of the United States government. Neither the United States government nor Lawrence Livermore National Security, LLC, nor any of their employees makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes.
This work performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
This document is released as LLNL-SM-2018190.