libcubescript/include/cubescript/cubescript_conf.hh

32 lines
761 B
C++
Raw Normal View History

2016-08-21 02:34:03 +02:00
#ifndef LIBCUBESCRIPT_CUBESCRIPT_CONF_HH
#define LIBCUBESCRIPT_CUBESCRIPT_CONF_HH
2021-04-03 05:46:05 +02:00
#include <type_traits>
2021-03-23 23:32:25 +01:00
namespace cubescript {
2021-03-23 23:29:32 +01:00
using integer_type = int;
using float_type = float;
2016-08-21 02:34:03 +02:00
2021-03-23 23:29:32 +01:00
constexpr auto const INT_FORMAT = "%d";
constexpr auto const FLOAT_FORMAT = "%.7g";
constexpr auto const ROUND_FLOAT_FORMAT = "%.1f";
2021-03-23 23:32:25 +01:00
} /* namespace cubescript */
2016-08-21 02:34:03 +02:00
2021-04-03 05:46:05 +02: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 */
#endif /* LIBCUBESCRIPT_CUBESCRIPT_CONF_HH */