Skip to content

Commit

Permalink
feat(example): validated_type now properly registers as a scalar type
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Sep 4, 2023
1 parent b3fb025 commit 81698f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/include/validated_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <gsl/gsl-lite.hpp>
#include <mp-units/bits/external/hacks.h>
#include <mp-units/bits/fmt.h>
#include <mp-units/customization_points.h>
#include <ostream>
#include <utility>

Expand Down Expand Up @@ -100,6 +101,9 @@ class validated_type {
= default;
};

template<typename T, typename Validator>
inline constexpr bool mp_units::is_scalar<validated_type<T, Validator>> = mp_units::is_scalar<T>;


template<typename CharT, typename Traits, typename T, typename Validator>
std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os,
Expand Down

0 comments on commit 81698f0

Please sign in to comment.