Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
582 stars 342 forks source link

Use C++17 attribute for deprecated types #1571

Closed ischoegl closed 11 months ago

ischoegl commented 11 months ago

Changes proposed in this pull request

Use C++17 attributes to generate deprecation warnings.

In #1565/#1568, the custom types compositionMap, vector_fp, and vector_int were deprecated. The C++17 attribute [[deprecated("reason")]] provides for a way to generate compile-time deprecation warnings. (The usual deprecation process with Cantera::warn_deprecated does not work for these instances.)

If applicable, provide an example illustrating new features this pull request is introducing

As an example, using vector_fp triggers the following warning on Apple clang:

warning: 'vector_fp' is deprecated: replaceable by vector<double> [-Wdeprecated-declarations]

Checklist

codecov[bot] commented 11 months ago

Codecov Report

Merging #1571 (c5cd3f2) into main (3332319) will decrease coverage by 0.02%. Report is 12 commits behind head on main. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1571      +/-   ##
==========================================
- Coverage   70.52%   70.50%   -0.02%     
==========================================
  Files         379      379              
  Lines       59110    59110              
  Branches    21232    21232              
==========================================
- Hits        41688    41678      -10     
- Misses      14347    14356       +9     
- Partials     3075     3076       +1     

see 6 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more