33#include < libhat/Defines.hpp>
44#include < string>
55
6+ namespace hat {
7+ struct system_info {
8+ system_info (const system_info&) = delete ;
9+ system_info& operator =(const system_info&) = delete ;
10+ system_info (system_info&&) = delete ;
11+ system_info& operator =(system_info&&) = delete ;
12+ protected:
13+ system_info ();
14+ };
15+ }
16+
617#if defined(LIBHAT_X86)
718namespace hat {
819
9- struct system_info_x86 {
20+ struct system_info_x86 : hat::system_info {
1021 std::string cpu_vendor{};
1122 std::string cpu_brand{};
1223 struct {
@@ -23,34 +34,29 @@ namespace hat {
2334 bool popcnt;
2435 bool bmi;
2536 } extensions{};
26-
27- system_info_x86 (const system_info_x86&) = delete ;
28- system_info_x86& operator =(const system_info_x86&) = delete ;
2937 private:
3038 system_info_x86 ();
3139 friend const system_info_x86& get_system ();
3240 static const system_info_x86 instance;
3341 };
3442
35- using system_info = system_info_x86;
43+ using system_info_impl = system_info_x86;
3644}
3745#elif defined(LIBHAT_ARM)
3846namespace hat {
3947
40- struct system_info_arm {
41- system_info_arm (const system_info_arm&) = delete ;
42- system_info_arm& operator =(const system_info_arm&) = delete ;
48+ struct system_info_arm : hat::system_info {
4349 private:
4450 system_info_arm () = default ;
4551 friend const system_info_arm& get_system ();
4652 static const system_info_arm instance;
4753 };
4854
49- using system_info = system_info_arm;
55+ using system_info_impl = system_info_arm;
5056}
5157#endif
5258
5359namespace hat {
5460
55- const system_info & get_system ();
61+ const system_info_impl & get_system ();
5662}
0 commit comments