Merge pull request #2498 from paulromano/gcc5-fixes

Fix compilation with gcc 5
This commit is contained in:
Patrick Shriwise 2023-04-27 07:27:32 -05:00 committed by GitHub
commit 96915c6091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -412,7 +412,7 @@ private:
bool full_phi_ {false};
constexpr inline int sanitize_angular_index(int idx, bool full, int N) const
inline int sanitize_angular_index(int idx, bool full, int N) const
{
if ((idx > 0) and (idx <= N)) {
return idx;
@ -467,7 +467,7 @@ private:
bool full_theta_ {false};
bool full_phi_ {false};
constexpr inline int sanitize_angular_index(int idx, bool full, int N) const
inline int sanitize_angular_index(int idx, bool full, int N) const
{
if ((idx > 0) and (idx <= N)) {
return idx;

View file

@ -216,14 +216,18 @@ using Direction = Position;
} // namespace openmc
namespace fmt {
template<>
struct fmt::formatter<openmc::Position> : formatter<std::string> {
struct formatter<openmc::Position> : formatter<std::string> {
template<typename FormatContext>
auto format(const openmc::Position& pos, FormatContext& ctx)
{
return fmt::formatter<std::string>::format(
return formatter<std::string>::format(
fmt::format("({}, {}, {})", pos.x, pos.y, pos.z), ctx);
}
};
} // namespace fmt
#endif // OPENMC_POSITION_H