2016-08-21 00:34:03 +00:00
|
|
|
#ifndef LIBCUBESCRIPT_CUBESCRIPT_CONF_HH
|
|
|
|
#define LIBCUBESCRIPT_CUBESCRIPT_CONF_HH
|
|
|
|
|
2021-04-03 03:46:05 +00:00
|
|
|
#include <type_traits>
|
|
|
|
|
2021-03-23 22:32:25 +00:00
|
|
|
namespace cubescript {
|
2021-03-23 22:29:32 +00:00
|
|
|
using integer_type = int;
|
|
|
|
using float_type = float;
|
2016-08-21 00:34:03 +00:00
|
|
|
|
2021-04-06 19:23:17 +00:00
|
|
|
constexpr auto const INTEGER_FORMAT = "%d";
|
2021-03-23 22:29:32 +00:00
|
|
|
constexpr auto const FLOAT_FORMAT = "%.7g";
|
|
|
|
constexpr auto const ROUND_FLOAT_FORMAT = "%.1f";
|
2021-03-23 22:32:25 +00:00
|
|
|
} /* namespace cubescript */
|
2016-08-21 00:34:03 +00:00
|
|
|
|
2021-04-03 03:46:05 +00:00
|
|
|
/* conf verification */
|
|
|
|
|
|
|
|
namespace cubescript {
|
|
|
|
|
|
|
|
static_assert(
|
|
|
|
std::is_integral_v<integer_type>, "integer_type must be integral"
|
|
|
|
);
|
|
|
|
static_assert(
|
|
|
|
std::is_signed_v<integer_type>, "integer_type must be signed"
|
|
|
|
);
|
|
|
|
static_assert(
|
|
|
|
std::is_floating_point_v<float_type>, "float_type must be floating point"
|
|
|
|
);
|
|
|
|
|
|
|
|
} /* namespace cubescript */
|
|
|
|
|
2021-03-21 23:58:35 +00:00
|
|
|
#endif /* LIBCUBESCRIPT_CUBESCRIPT_CONF_HH */
|