3 #ifndef SPECTMORPH_UTIL_HH 4 #define SPECTMORPH_UTIL_HH 14 typedef uint8_t uint8;
15 typedef int64_t int64;
16 typedef uint64_t uint64;
18 #define SPECTMORPH_CLASS_NON_COPYABLE(Class) private: Class (const Class&); Class& operator= (const Class&); 19 #define SPECTMORPH_PRINTF(format_idx, arg_idx) __attribute__ ((__format__ (__printf__, format_idx, arg_idx))) 21 std::string string_printf (
const char *format, ...) SPECTMORPH_PRINTF (1, 2);
22 std::
string string_vprintf (const
char *format, va_list vargs);
24 std::
string string_locale_printf (const
char *format, ...) SPECTMORPH_PRINTF (1, 2);
26 void sm_printf (const
char *format, ...) SPECTMORPH_PRINTF (1, 2);
33 std::string sm_get_install_dir (InstallDir p);
40 std::string sm_get_user_dir (UserDir p);
41 std::string sm_get_default_plan();
52 bool constexpr operator== (Error v, int64_t n) {
return int64_t (v) == n; }
53 bool constexpr operator== (int64_t n, Error v) {
return n == int64_t (v); }
54 bool constexpr operator!= (Error v, int64_t n) {
return int64_t (v) != n; }
55 bool constexpr operator!= (int64_t n, Error v) {
return n != int64_t (v); }
57 const char *sm_error_blurb (Error error);
Definition: smalignedarray.cc:7