Skip to content

[REFACTOR] Remove deprecation.h - C++20 Module preparation #221

Description

@kcenon

Summary

Remove or consolidate core/deprecation.h in container_system to simplify the codebase for C++20 module migration, following Kent Beck's "Fewest Elements" principle.

Parent Epic

Part of kcenon/common_system#256 (C++20 Module Migration - Cross-System Preparation)

Current State

File Location

include/container/core/deprecation.h

Problem Analysis

Issue Kent Beck Principle
Separate file for deprecation markers Fewest Elements
Should use standard [[deprecated]] attribute Reveals Intention
Adds unnecessary header dependency No Duplication

C++20 Module Impact

Deprecation headers add complexity to module boundaries:

export module kcenon.container;
// deprecation.h should not be part of public module interface

Proposed Solution

Option 1: Remove file entirely

  • Replace custom deprecation macros with [[deprecated("message")]]
  • C++14+ standard attribute is sufficient

Option 2: Move to internal namespace

  • If custom deprecation tracking is needed
  • Move to detail:: or internal:: namespace

Tasks

  • Audit deprecation.h contents and usage
  • Identify all uses of custom deprecation macros
  • Replace with standard [[deprecated]] attribute
  • Remove deprecation.h if no longer needed
  • Update documentation

Acceptance Criteria

  • No custom deprecation mechanisms where standard suffices
  • Clean module boundary for C++20 migration
  • All tests pass
  • No breaking changes to public API

Related

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions