pclass: Second attempt to fix BitInteger casters on CI

This commit is contained in:
Joshua Scott 2018-12-15 17:11:16 +00:00
parent 8c70a249d8
commit c512185115
1 changed files with 27 additions and 27 deletions

View File

@ -12,33 +12,6 @@ namespace pclass
{ {
namespace detail namespace detail
{ {
/**
* A utility to call ValueCaster::declare<SrcT, DestT> with
* bi<N> and bui<N> as the destination type.
*
* N is automatically decremented until it reaches 0.
*/
template <typename T, int N = 7>
struct bit_integer_declarer
{
static void declare()
{
bit_integer_declarer<T, N - 1>::declare();
ValueCaster::declare<T, bi<N>>();
ValueCaster::declare<T, bui<N>>();
}
};
/**
* Specialization for bit_integer_declarer.
* Stop decrementing N when it reaches 0.
*/
template <typename T>
struct bit_integer_declarer<T, 0>
{
static void declare() {}
};
/** /**
* Determines whether a type can be assigned to a * Determines whether a type can be assigned to a
* nlohmann::json object. * nlohmann::json object.
@ -202,6 +175,33 @@ namespace detail
} }
}; };
/**
* A utility to call ValueCaster::declare<SrcT, DestT> with
* bi<N> and bui<N> as the destination type.
*
* N is automatically decremented until it reaches 0.
*/
template <typename T, int N = 7>
struct bit_integer_declarer
{
static void declare()
{
bit_integer_declarer<T, N - 1>::declare();
ValueCaster::declare<T, bi<N>>();
ValueCaster::declare<T, bui<N>>();
}
};
/**
* Specialization for bit_integer_declarer.
* Stop decrementing N when it reaches 0.
*/
template <typename T>
struct bit_integer_declarer<T, 0>
{
static void declare() {}
};
/** /**
* Utility class used by TypeSystem to declare casters for each * Utility class used by TypeSystem to declare casters for each
* primitive type. * primitive type.