Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++17 #1164

Merged
merged 18 commits into from
Jan 24, 2022
Merged

C++17 #1164

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove C++14-only Code
  • Loading branch information
ax3l committed Jan 24, 2022
commit d9b35529c2789699c455155611980854535a8eb4
35 changes: 0 additions & 35 deletions include/openPMD/auxiliary/Unused.hpp

This file was deleted.

12 changes: 2 additions & 10 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,11 +1359,7 @@ namespace detail
* that would otherwise be lost. Check whether this has been done.
*/
using rep = AttributeTypes< bool >::rep;
if
#if __cplusplus >= 201703L
constexpr
#endif
( std::is_same< T, rep >::value )
if constexpr( std::is_same< T, rep >::value )
{
std::string metaAttr =
ADIOS2Defaults::str_isBooleanOldLayout + name;
Expand Down Expand Up @@ -1414,11 +1410,7 @@ namespace detail
* that would otherwise be lost. Check whether this has been done.
*/
using rep = AttributeTypes<bool>::rep;
if
#if __cplusplus >= 201703L
constexpr
#endif
( std::is_same< T, rep >::value )
if constexpr( std::is_same< T, rep >::value )
{
std::string metaAttr =
ADIOS2Defaults::str_isBooleanNewLayout + name;
Expand Down
7 changes: 3 additions & 4 deletions src/auxiliary/Filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
#include "openPMD/auxiliary/Filesystem.hpp"
#include "openPMD/auxiliary/StringManip.hpp"
#include "openPMD/auxiliary/Unused.hpp"

#ifdef _WIN32
# include <windows.h>
Expand Down Expand Up @@ -200,11 +199,11 @@ namespace
* Only some of these are actually instanciated,
* so suppress warnings for the others.
*/
OPENPMDAPI_UNUSED
[[maybe_unused]]
ax3l marked this conversation as resolved.
Show resolved Hide resolved
MPI_Datatype const MPI_Types< unsigned >::value = MPI_UNSIGNED;
OPENPMDAPI_UNUSED
[[maybe_unused]]
MPI_Datatype const MPI_Types< unsigned long >::value = MPI_UNSIGNED_LONG;
OPENPMDAPI_UNUSED
[[maybe_unused]]
MPI_Datatype const MPI_Types< unsigned long long >::value = MPI_UNSIGNED_LONG_LONG;
} // namespace

Expand Down