Skip to content

Commit

Permalink
feat: utility concepts header
Browse files Browse the repository at this point in the history
for storing useful concepts related headers
  • Loading branch information
scarf005 committed Mar 28, 2023
1 parent 90d4453 commit e3bc071
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/concepts_utility.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once
#ifndef CATA_SRC_CONCEPTS_UTILITY_DEF_H
#define CATA_SRC_CONCEPTS_UTILITY_DEF_H
#include <cmath>

template<typename T>
concept Arithmatic = std::is_arithmetic_v<T>;

template <Arithmatic A, Arithmatic B>
using WiderType = std::common_type_t<A, B>;

#endif // CATA_SRC_CONCEPTS_UTILITY_DEF_H

0 comments on commit e3bc071

Please sign in to comment.