Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (LLNL#247)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-clang-format: v14.0.6 → v15.0.4](pre-commit/mirrors-clang-format@v14.0.6...v15.0.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Nov 21, 2022
1 parent 2ce0018 commit 261236f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
- id: end-of-file-fixer
- id: check-shebang-scripts-are-executable
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
rev: v15.0.4
hooks:
- id: clang-format
types:
Expand Down
36 changes: 12 additions & 24 deletions units/units_math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,38 @@ namespace UNITS_NAMESPACE {

/// type_trait for detecting any measurement type
template<typename T>
struct is_measurement : std::false_type {
};
struct is_measurement : std::false_type {};

template<>
struct is_measurement<measurement> : std::true_type {
};
struct is_measurement<measurement> : std::true_type {};
template<>
struct is_measurement<precise_measurement> : std::true_type {
};
struct is_measurement<precise_measurement> : std::true_type {};
template<>
struct is_measurement<fixed_measurement> : std::true_type {
};
struct is_measurement<fixed_measurement> : std::true_type {};

template<>
struct is_measurement<fixed_precise_measurement> : std::true_type {
};
struct is_measurement<fixed_precise_measurement> : std::true_type {};

template<>
struct is_measurement<uncertain_measurement> : std::true_type {
};
struct is_measurement<uncertain_measurement> : std::true_type {};

/// type_trait for detecting a precise measurement type
template<typename T>
struct is_precise_measurement : std::false_type {
};
struct is_precise_measurement : std::false_type {};

template<>
struct is_precise_measurement<fixed_precise_measurement> : std::true_type {
};
struct is_precise_measurement<fixed_precise_measurement> : std::true_type {};
template<>
struct is_precise_measurement<precise_measurement> : std::true_type {
};
struct is_precise_measurement<precise_measurement> : std::true_type {};

/// type_trait for detecting a unit type
template<typename T>
struct is_unit : std::false_type {
};
struct is_unit : std::false_type {};

template<>
struct is_unit<unit> : std::true_type {
};
struct is_unit<unit> : std::true_type {};
template<>
struct is_unit<precise_unit> : std::true_type {
};
struct is_unit<precise_unit> : std::true_type {};

// cmath overloads

Expand Down

0 comments on commit 261236f

Please sign in to comment.