Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
experimental_api.h File Reference

Macros and utilities for marking experimental APIs. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::network
 Main namespace for all Network System components.
 
namespace  kcenon::network::experimental
 

Macros

#define NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG    "Experimental API - define NETWORK_USE_EXPERIMENTAL to use"
 
#define NETWORK_REQUIRE_EXPERIMENTAL    static_assert(false, NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG)
 Enforces opt-in for experimental APIs at compile time.
 
#define NETWORK_EXPERIMENTAL_API
 Marks a class or function as experimental.
 
#define NETWORK_EXPERIMENTAL_WARNING(msg)
 Prints a compile-time warning for experimental API usage.
 

Detailed Description

Macros and utilities for marking experimental APIs.

This header provides compile-time markers for experimental APIs that may change without notice. Users must explicitly opt-in to use experimental features by defining NETWORK_USE_EXPERIMENTAL before including headers.

Stability Levels

  • STABLE: APIs in core/ and http/ directories
  • EXPERIMENTAL: APIs in experimental/ directory

Usage

To use experimental APIs, define NETWORK_USE_EXPERIMENTAL:

#define NETWORK_USE_EXPERIMENTAL

Without the define, a clear compiler error will guide users.

Definition in file experimental_api.h.

Macro Definition Documentation

◆ NETWORK_EXPERIMENTAL_API

#define NETWORK_EXPERIMENTAL_API

Marks a class or function as experimental.

Applies the [[deprecated]] attribute with a clear message indicating that the API is experimental and may change without notice.

Example

class NETWORK_EXPERIMENTAL_API quic_client {
// ...
};
#define NETWORK_EXPERIMENTAL_API
Marks a class or function as experimental.

Definition at line 75 of file experimental_api.h.

◆ NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG

#define NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG    "Experimental API - define NETWORK_USE_EXPERIMENTAL to use"

Definition at line 37 of file experimental_api.h.

37#define NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG \
38 "Experimental API - define NETWORK_USE_EXPERIMENTAL to use"

◆ NETWORK_EXPERIMENTAL_WARNING

#define NETWORK_EXPERIMENTAL_WARNING ( msg)

Prints a compile-time warning for experimental API usage.

Definition at line 87 of file experimental_api.h.

◆ NETWORK_REQUIRE_EXPERIMENTAL

#define NETWORK_REQUIRE_EXPERIMENTAL    static_assert(false, NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG)

Enforces opt-in for experimental APIs at compile time.

Place this macro at the top of experimental header files. It will cause a compilation error if NETWORK_USE_EXPERIMENTAL is not defined.

Definition at line 48 of file experimental_api.h.

48#define NETWORK_REQUIRE_EXPERIMENTAL \
49 static_assert(false, NETWORK_EXPERIMENTAL_STATIC_ASSERT_MSG)