Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 2.89 KB

File metadata and controls

35 lines (29 loc) · 2.89 KB

Supported C++ Features

The Aburiscript compiler is actively developing C++ support. It currently understands a substantial subset of C++ concepts, specifically targeting the Itanium ABI.

Core Language

  • Enums: Unscoped enums plus C++ scoped enums (enum class / enum struct), fixed underlying types, scoped opaque declarations, nested qualified enumerator lookup, and switch / comparison support for scoped enum values.
  • Inline Variables: Namespace-scope inline variables plus inline static class data members, including header-defined ODR-mergeable codegen and extern inline redeclarations around a later inline definition.
  • Variable Templates: Namespace-scope primary variable templates plus explicit and partial specializations, with explicit template-id expressions such as flag<int> materializing in both call and non-call contexts.

Object-Oriented Programming

  • Classes and Structs: class and struct definitions, access control (public, private, protected).
  • Member Functions: Methods (with implicit this pointer), static member functions, and static data members, including inline static data members.
  • Conversion Operators: Class conversion functions including dependent targets, explicit operator bool in conditions, and explicit-conversion use through static_cast.
  • Lifecycle: Constructors (including initializer lists) and Destructors (~Class()).
  • Dynamic Allocation: Global and class-specific new, new[], delete, and delete[] operators.

Polymorphism and Inheritance

  • Single and Multiple Inheritance: Support for base classes and virtual bases.
  • Virtual Methods: Dynamic dispatch via virtual method tables (V-Tables).
  • RTTI (Run-Time Type Information):
    • typeid for static and dynamic queries.
    • dynamic_cast for safe pointer and reference downcasting/cross-casting.
  • Member Pointers: Pointers to data members and member functions (.*, ->*).

Exceptions

  • Try/Catch Blocks: try { ... } catch (Type obj) { ... } including catch-all catch (...).
  • Throw Expressions: Throwing objects and re-throwing (throw;).
  • Noexcept: noexcept specifiers and predicates (noexcept(expr)).
  • Teardown: Automatic stack unwinding and destructor invocation upon exceptions.

Current Boundaries

  • Templates: The templating engine is present but still expanding in coverage (partial instantiation, SFINAE, member variable templates, etc.).
  • Operator Overloading: Coverage is still incomplete outside the currently implemented arithmetic/call/subscript/member-pointer/conversion paths.
  • RTTI Surface Model: typeid currently exposes a compiler-owned RTTI surface type rather than std::type_info, because standard library headers are not parsed yet.
  • Standard Library: Standard library integration (like <iostream>, <vector>) is non-existent while the language feature set continues to expand.