Skip to content

Releases: asutton/clang

Alpha

21 Apr 13:55
Compare
Choose a tag to compare
Alpha Pre-release
Pre-release

This release of the clang-cppx compiler supports:

  • Reflection operators $ and reflexpr.
  • Reification operators typename and declname.
  • Tuple-based for loop expansion (e.g. ,for... (x : t) where t is a Tuple, as in the concept).
  • metaclass definitions (e.g., $class interface { ... }).
  • metaclass application (e.g. , interface IFoo { ... }).
  • constexpr evaluation blocks in namespace, class, and function scopes (e.g., constexpr { ... }).
  • token injection within constexpr blocks (e.g., -> { int f() { return 3; } }).
  • The ability to modify access specifiers, and to make a member virtual.
  • Library support for reflection (<cppx/meta>).
  • Library support for user-defined compiler errors (<cppx/compiler>).

All of these features are experimental and subject to a) not working as promised, b) not working at all, or c) crashing the compiler. Consider yourself forewarned. Please submit an issue.

To use these features, be sure to compile with -std=c++1z and -Xclang -freflection. The -Xclang bit forwards the -freflection flag to the C++ compiler (this is issue #1). Also, the directory including the cppx headers must be on path. This build installs those headers alongside the Clang and LLVM headers.