WIP
This commit is contained in:
20
tmp/sec.cpp
20
tmp/sec.cpp
@@ -1,13 +1,33 @@
|
||||
#include <cstdint>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
namespace test {
|
||||
enum MyEnum : uint16_t {
|
||||
ENUM_VAL1 = 10,
|
||||
ENUM_VAL2 = 5,
|
||||
ENUM_VAL3 = 0xFFF,
|
||||
};
|
||||
|
||||
struct MyType {
|
||||
int data;
|
||||
uint32_t test_bits : 20;
|
||||
uint32_t test_bits2: 12;
|
||||
MyEnum enum_val;
|
||||
};
|
||||
}
|
||||
|
||||
void helper_fn() {
|
||||
test::MyType tmp = test::MyType{1};
|
||||
std::string test = "Hello World";
|
||||
sleep(tmp.data);
|
||||
{
|
||||
test::MyType tmp = test::MyType{2};
|
||||
sleep(tmp.data);
|
||||
}
|
||||
}
|
||||
|
||||
void helper_fn2() {
|
||||
test::MyType tmp = test::MyType{3};
|
||||
sleep(tmp.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user