CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2026-03-12
by Justin Polidora

Original Post

Original - Posted on 2026-03-11
by Justin Polidora



            
Present in both answers; Present only in the new answer; Present only in the old answer;

# [cpp-enum-stringifier](https://github.com/Fresbee/cpp-enum-stringifier)
**Full disclosure**: I am the author of this project.
cpp-enum-stringifier is an importable CMake module that generates human-readable enum string values for ease of debugging. This allows you to output human-readable values to stdout or log files without having to painstakingly match integer values to the enum header.
### Use Case
This handles out-of-order enum values and arbitrarily assigned enum values. It uses your C++ compiler to generate a companion .h file with string values. Doing so reduces the maintenance burden for a `std::map<EnumType, string>` or manually updated header file.
I made this to support projects that want to avoid pulling in a heavier dependency like Boost or Qt that support introspection. You do need to use CMake to build your project along with Python 3.9+. It should work on Windows or Linux.
### Example Usage
If you have an original header file called `ConnectionState.h` with an enum, this CMake module creates a companion file called `ConnectionStateStr.h`. Simply import this new file wherever you would like to lookup the string name of an enum value as shown below:
```cpp #include <iostream> #include "ConnectionStateStr.h"
using namespace std;
void MyFunction() { cout << "Current connection state enum value: " << EnumLookup::ConnectionStateStr::LookupName(Comm::CONNECTION_SECURED) << endl; } ```
# [cpp-enum-stringifier](https://github.com/Fresbee/cpp-enum-stringifier)
**Full disclosure**: I am the author of this project.
cpp-enum-stringifier is an importable CMake module that generates human-readable enum string values for ease of debugging. This allows you to output human-readable values to stdout or log files without having to painstakingly match integer values to the enum header.
### Use Case
This handles out-of-order enum values and arbitrarily assigned enum values. It uses your C++ compiler to generate a companion .h file with string values. Doing so reduces the maintenance burden for a `std::map<EnumType, string>` or manually updated header file.
I made this to support projects that want to avoid pulling in a heavier dependency like Boost or Qt that support introspection. You do need to use CMake to build your project along with Python 3.9+. It should work on Windows or Linux.
### Example Usage
If you have an original header file called `ConnectionState.h` with an enum, this CMake module creates a companion file called `ConnectionStateStr.h`. Simply import this new file wherever you would like to lookup the string name of an enum value as shown below:
```cpp #include <iostream> #include "ConnectionStateStr.h"
using namespace std;
void MyFunction() { cout << "Current connection state enum value: " << EnumLookup::ConnectionStateStr::LookupName(Comm::CONNECTION_SECURED) << endl; } ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;