Defined in carb/Interface.h

CARB_PLUGIN_INTERFACE_EX(name, latestVersion, currentVersion)

Macro to declare a struct as a Carbonite interface that allows for a different current version than latest.

This macro must be used in a public section of the interface struct. It is recommended to have it be the first public “member” of the struct.

For plugins that support multiple interface versions through CARB_PLUGIN_IMPL_EX, the major and minor version represent the highest version available. This version will also be requested immediately after plugin registration and must succeed.

When using, a trailing semicolon is optional.

See Framework Overview and Carbonite Interfaces for more information on creating Carbonite plugins.

// Effective implementation
static constexpr carb::InterfaceDesc getInterfaceDesc() noexcept
    return carb::InterfaceDesc{ name, carb::fromHexVersion(currentVersion) };
static constexpr carb::InterfaceDesc getLatestInterfaceDesc() noexcept
    return carb::InterfaceDesc{ name, carb::fromHexVersion(latestVersion) };


This macro supersedes CARB_PLUGIN_INTERFACE which is retained for backwards compatibility, but assumes that the current and latest versions are always the same.

  • name – The name of the interface.

  • latestVersion – A macro typically representing the namespace separated by _ characters with _latest appended (i.e. carb_logging_ILogging_latest) that is defined as CARB_HEXVERSION of the latest semantic version of the interface.

  • currentVersion – A macro typically representing the namespace separated by _ characters (i.e. carb_logging_ILogging). If not externally defined this should be defined as CARB_HEXVERSION of the default version.