Skip to content

Conversation

@lrleon
Copy link
Owner

@lrleon lrleon commented Feb 8, 2026

PR Title

Fix compilation errors and translate examples to English

Description

This branch addresses several compilation errors and warnings encountered when building the project (specifically with C++20), and updates the examples to use English.

Detailed Changes

  1. Compilation Fixes in include/uconv.H:

    • Operator Ambiguity Resolution: Fixed an "ambiguous overload" error in arithmetic operations (e.g., length + width). Added explicit template overloads for operator+ and operator- in the Quantity class that accept Quantity<U>, preventing conflicting implicit conversions to VtlQuantity.
    • static_cast Warnings: Removed an unnecessary const qualifier in the static_cast within PhysicalQuantity::search that was generating warnings.
    • nodiscard Warnings: Suppressed the warning for ignoring the return value of insert in UnitConverter by casting it to void.
  2. Fixes in Unit Definitions (include/units/temperature.H):

    • Corrected unknown escape sequences in string literals (e.g., changing \degree to \\degree) that were preventing the temperature units from compiling correctly.
  3. Examples Update (Examples/basic_conversion.cc):

    • Translated comments and console output messages from Spanish to English to maintain consistency with the rest of the project.
    • Renamed local variables (largo -> length, ancho -> width, etc.) to English.

lrleon added 14 commits February 7, 2026 17:03
…ystem

Migrates unit definitions from C++ macros to a Ruby DSL, with a new gen-units script to generate C++ headers. Updates CMake to manage the unit generation and build process for lib, tests, examples, and fuzz. Includes new unit definitions for various physical quantities.
Refactor unit definition, generation, and testing infrastructure.
Introduce DSL validation, move utilities, and add comprehensive CI workflows.
Refactor unit definition, generation, and testing infrastructure.
Introduce DSL validation, move utilities, and add comprehensive CI workflows.
Refactor `bin/gen-units` to generate a `units_catalog.md` file for Doxygen, enhancing documentation of physical quantities, units, and conversions. Update CMake to include this catalog in the build process and modify CI workflows to validate its presence and content. Improve `README.md` and `mainpage.md` to reflect the new documentation structure and clarify library consumption.
Refactor `bin/gen-units` to generate a `units_catalog.md` file for Doxygen, enhancing documentation of physical quantities, units, and conversions. Update CMake to include this catalog in the build process and modify CI workflows to validate its presence and content. Improve `README.md` and `mainpage.md` to reflect the new documentation structure and clarify library consumption.
Refactor: Change nlohmann-json3-dev to libtclap-dev in ci.yml and full_analysis.yml.
Replaced direct usage of C++ standard library components with explicit std:: qualification (e.g., 'std::string' instead of 'string', 'std::cout' instead of 'cout', 'std::endl' instead of 'endl', 'std::domain_error' instead of 'domain_error'). This refactoring improves code clarity, avoids potential naming conflicts, and ensures consistent best practices across the codebase, affecting source, test, and utility files.
Add acceleration, capacitance, charge, dynamic viscosity, energy, force, kinematic viscosity, mass, mass flow, resistance, torque, voltage, and volume physical quantities with their respective units and conversions.
Refactor `Unit` and `PhysicalQuantity` internals, including symbol normalization and alias handling.
Remove old `Imakefile`s and `depend.sh` scripts, migrating to CMake-based build.
Enhance CMake build with Clang `gcc-install-dir` detection, fuzzing smoke tests, and improved test/documentation configurations.
Update Doxygen documentation and `README.md` to reflect new DSL validation rules and API structure.
Refactor error handling to use ah-uconv-errors.H for uconv-specific exceptions, mirroring ah-errors.H. Update `uconv.H`, `unititem.H`, `all-units.cc`, and `gen-units` to utilize the new error macros, improving consistency and clarity of error messages.
- CMake: Add `UCONV_CLANG_GCC_TOOLCHAIN` variable to support `--gcc-toolchain`
- CI: Verify Clang supports `--gcc-install-dir` before using it
@lrleon lrleon merged commit b14b21a into master Feb 9, 2026
26 checks passed
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.

1 participant