File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,10 @@ std::string getVersion();
8686 *
8787 * @return std::string openPMD standard version (dot separated)
8888 */
89- std::string getStandard ();
89+ [[deprecated (
90+ " Deprecated due to unclear semantics. Use one of getStandardMinimum, "
91+ " getStandardMaximum() or getStandardDefault instead." )]] std::string
92+ getStandard ();
9093
9194/* * Return the default used version of the openPMD standard (read & write,
9295 * run-time)
@@ -102,6 +105,13 @@ std::string getStandardDefault();
102105 */
103106std::string getStandardMinimum ();
104107
108+ /* * Return the minimum supported version of the openPMD standard (read,
109+ * run-time)
110+ *
111+ * @return std::string minimum openPMD standard version (dot separated)
112+ */
113+ std::string getStandardMaximum ();
114+
105115/* * Return the feature variants of the openPMD-api library (run-time)
106116 *
107117 * @return std::map< std::string, bool > with variants such as backends
Original file line number Diff line number Diff line change @@ -35,10 +35,7 @@ std::string openPMD::getVersion()
3535
3636std::string openPMD::getStandard ()
3737{
38- std::stringstream standard;
39- standard << OPENPMD_STANDARD_MAJOR << " ." << OPENPMD_STANDARD_MINOR << " ."
40- << OPENPMD_STANDARD_PATCH;
41- return standard.str ();
38+ return getStandardMaximum ();
4239}
4340
4441std::string openPMD::getStandardDefault ()
@@ -58,3 +55,11 @@ std::string openPMD::getStandardMinimum()
5855 << OPENPMD_STANDARD_MIN_PATCH;
5956 return standardMin.str ();
6057}
58+
59+ std::string openPMD::getStandardMaximum ()
60+ {
61+ std::stringstream standard;
62+ standard << OPENPMD_STANDARD_MAJOR << " ." << OPENPMD_STANDARD_MINOR << " ."
63+ << OPENPMD_STANDARD_PATCH;
64+ return standard.str ();
65+ }
Original file line number Diff line number Diff line change 11// expose private and protected members for invasive testing
2- #include " openPMD/Datatype.hpp"
3- #include " openPMD/Error.hpp"
42#if openPMD_USE_INVASIVE_TESTS
53#define OPENPMD_private public:
64#define OPENPMD_protected public:
@@ -39,7 +37,7 @@ TEST_CASE("versions_test", "[core]")
3937 auto const standardDefault = getStandardDefault ();
4038 REQUIRE (standardDefault == " 1.1.0" );
4139
42- auto const standard = getStandard ();
40+ auto const standard = getStandardMaximum ();
4341 REQUIRE (standard == " 2.0.0" );
4442
4543 auto const standardMin = getStandardMinimum ();
You can’t perform that action at this time.
0 commit comments