Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 10, 2025

Summary

  • Fixed the CProperties concept to use TObject& instead of TObject in the requires expression
  • This change allows the concept to work correctly when TObject is already a reference type (int&, const int&)

Changes Made

  • Modified cpp/Platform.Interfaces/CProperties.h line 7 to use TObject& object instead of TObject object in the concept requirements

Test Plan

  • Created test programs to verify the concept works with value types (int)
  • Verified the concept works with reference types (int&)
  • Verified the concept works with const reference types (const int&)
  • Confirmed the change maintains backward compatibility
  • All concept static_assert tests pass

Background

The issue was reported as needing to use TObject& instead of TObject in concepts. The problem was that when testing concepts with reference types like CProperties<EmptyProperties, int&, int, int>, the original definition using TObject object didn't handle reference type parameters optimally. By changing to TObject& object, the concept now works correctly with both value types and reference types.

Fixes #88

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #88
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 18:31
Changed the concept definition to use TObject& instead of TObject in the
requires expression to better handle reference types in template parameters.
This allows the concept to work correctly when TObject is already a
reference type (int&, const int&).

Fixes #88

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] TODO can be use in concepts TObject& instead of TObject Use TObject& instead of TObject in CProperties concept Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TODO can be use in concepts TObject& instead of TObject

2 participants