-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the new is_pod method to simdb::utils::is_pod, so that it won't be confused with std::is_pod in the event of `using namespace std'. Also move the struct definition to a new file, `simdb/utils/CompatUtils.hpp', so that it is centralized in one place.
- Loading branch information
Showing
4 changed files
with
40 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// <CompatUtils> -*- C++ -*- | ||
|
||
#pragma once | ||
|
||
#include <type_traits> | ||
|
||
namespace simdb { | ||
namespace utils { | ||
|
||
//! \brief Replacement for std::is_pod, which was deprecated in C++20 | ||
|
||
template<typename T> | ||
struct is_pod { | ||
static constexpr bool value = std::is_trivial<T>::value | ||
&& std::is_standard_layout<T>::value; | ||
}; | ||
|
||
} // namespace utils | ||
} // namespace simdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters