mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
* chore: C++17 modernization — remove shims, use stdlib idioms
Phase 1 — Mechanical:
- Replace crossplatform_shared_ptr.h with <memory> in all 20 files; delete shim
- Replace NULL with nullptr (~10 occurrences)
- Replace throw() with noexcept (DataStructures.h)
- Convert 30+ iterator for-loops to range-for with auto/structured bindings
- Replace insert(make_pair/pair<>) with emplace/try_emplace (~40 sites)
- Replace shared_ptr<T>(new T) with make_shared<T> (~5 sites)
Phase 2 — Optional/structured bindings:
- get_alternate() returns std::optional<pair<size_t,size_t>>; remove has_valid_neighbor()
- get_set_of_tables() eliminates bool out-param, returns std::pair
- is_inside() switch refactored to IIFE eliminating nullptr-init pattern
Phase 3 — Attributes:
- Remove DEPRECATED macro; use [[deprecated("...")]] directly (PolyMath.h)
- Add [[nodiscard]] to is_inside, valid, calc_saturated_*_keyed_output,
get_parameter_information/index, generate_update_pair, has_number
Phase 4 — Architectural:
- CPfilepaths.cpp: use std::filesystem on non-Android/Emscripten/powerpc targets
- DataStructures.h: annotate 5 public enums with explicit underlying type (: int)
- get_parameter_information() takes std::string_view for info param
Build: clean, zero errors. Test suite: 100/110 pass (10 known pre-existing failures).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove Unicode replacement character (U+FFFD) from 870.cpp
Addresses PR review comment about non-printing character on line 25.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove unnecessary <memory> include from IdealCurves.h
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Always use std::filesystem
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>