mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Merge pull request #2498 from paulromano/gcc5-fixes
Fix compilation with gcc 5
This commit is contained in:
commit
96915c6091
2 changed files with 8 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue