Skip to main content

A new package that automates equality checks in C++ code by leveraging the upcoming reflection capabilities in C++26. This tool will allow developers to input C++ code snippets or class definitions, a

Project description

C++26 Equality Linter

PyPI version License: MIT Downloads LinkedIn

A new package that automates equality checks in C++ code by leveraging the upcoming reflection capabilities in C++26. This tool allows developers to input C++ code snippets or class definitions, and the package will use llmatch-messages to parse and analyze the code, ensuring that equality operators (like ==, !=) are correctly implemented and consistent with the class's structure.

Features

  • Automated equality checks for C++ code
  • Leverages C++26 reflection capabilities
  • Provides structured feedback on potential issues
  • Suggests corrections and verifies best practices
  • Easy integration with existing C++ codebases

Installation

pip install cpp26-equality-linter

Usage

Basic Usage

from cpp26-equality-linter import cpp26_equality_linter

response = cpp26_equality_linter(user_input="your C++ code here")
print(response)

Using a Custom LLM

from langchain_openai import ChatOpenAI
from cpp26-equality-linter import cpp26_equality_linter

llm = ChatOpenAI()
response = cpp26_equality_linter(user_input="your C++ code here", llm=llm)
print(response)

Using LLM7 with API Key

from cpp26-equality-linter import cpp26_equality_linter

response = cpp26_equality_linter(user_input="your C++ code here", api_key="your_api_key")
print(response)

Parameters

  • user_input (str): The user input text to process
  • llm (Optional[BaseChatModel]): The langchain llm instance to use, if not provided the default ChatLLM7 will be used.
  • api_key (Optional[str]): The api key for llm7, if not provided

Default LLM

The package uses ChatLLM7 from langchain_llm7 by default. You can safely pass your own llm instance if you want to use another LLM.

Example with OpenAI

from langchain_openai import ChatOpenAI
from cpp26-equality-linter import cpp26_equality_linter

llm = ChatOpenAI()
response = cpp26_equality_linter(user_input="your C++ code here", llm=llm)
print(response)

Example with Anthropic

from langchain_anthropic import ChatAnthropic
from cpp26-equality-linter import cpp26_equality_linter

llm = ChatAnthropic()
response = cpp26_equality_linter(user_input="your C++ code here", llm=llm)
print(response)

Example with Google

from langchain_google_genai import ChatGoogleGenerativeAI
from cpp26-equality-linter import cpp26_equality_linter

llm = ChatGoogleGenerativeAI()
response = cpp26_equality_linter(user_input="your C++ code here", llm=llm)
print(response)

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you want higher rate limits for LLM7, you can pass your own api_key via environment variable LLM7_API_KEY or via passing it directly like:

from cpp26-equality-linter import cpp26_equality_linter

response = cpp26_equality_linter(user_input="your C++ code here", api_key="your_api_key")
print(response)

You can get a free api key by registering at LLM7.

Issues

If you encounter any issues or have suggestions, please open an issue on GitHub.

Author

Eugene Evstafev

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpp26_equality_linter-2025.12.20185334.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cpp26_equality_linter-2025.12.20185334.tar.gz.

File metadata

File hashes

Hashes for cpp26_equality_linter-2025.12.20185334.tar.gz
Algorithm Hash digest
SHA256 c8f54d9f06302bfed1afccb88b67896dbb6903e34204523827d10e7a4de28895
MD5 023c5990c80734d9c1fe0d147ea14a1b
BLAKE2b-256 5f912804e5acf9cc4da9c8d5e174d117af7ca7eca7abf2cb7b5569855962cb2e

See more details on using hashes here.

File details

Details for the file cpp26_equality_linter-2025.12.20185334-py3-none-any.whl.

File metadata

File hashes

Hashes for cpp26_equality_linter-2025.12.20185334-py3-none-any.whl
Algorithm Hash digest
SHA256 017e354f63298ccfac8a89bebfd34c65b27695b640933f92eba517db76a02645
MD5 1975f43fe13fcf56ab56eeeedc3814bc
BLAKE2b-256 9dd5183dfa15a0b620a3bb5abbb012a926aba35c3129db79f17fd6335be0af4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page