46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
#include <iostream>
 | 
						|
#include <array>
 | 
						|
#include <charconv>
 | 
						|
#include "engine/api.h"
 | 
						|
void test(std::string_view str = "") {
 | 
						|
	std::cout << "test " << str << std::endl;
 | 
						|
}
 | 
						|
int main(int argc, char** argv) {
 | 
						|
	api::ModuleManager::Ptr()->MakeGraph("zworld", true, argc, argv);
 | 
						|
	test("sss");
 | 
						|
	using namespace refl;
 | 
						|
	constexpr TStr str1{ "Hello" };
 | 
						|
	constexpr TStr str2{ " world" };
 | 
						|
	constexpr TStr str3 = detail::concat(str1, str2);
 | 
						|
	constexpr auto r1 = value_name<8 * sizeof(int)>();
 | 
						|
	constexpr int v = 12;
 | 
						|
	auto cls = &refl::TypeInfo<int>::StaticClass;
 | 
						|
	//auto str4 = concat(r1, str2);
 | 
						|
	auto t1 = refl::type_name<int>();
 | 
						|
	auto v1 = refl::type_name<int>().View();
 | 
						|
	auto v2 = t1.View();
 | 
						|
	if (v1 == t1.View()) {
 | 
						|
		auto t2 = refl::type_name<int16_t>();
 | 
						|
		auto t3 = refl::type_name<int8_t>();
 | 
						|
	}
 | 
						|
	auto t2 = refl::type_name<int16_t>();
 | 
						|
	auto t3 = refl::type_name<int8_t>();
 | 
						|
	pmr::FrameAllocatorPool pool;
 | 
						|
	pmr::Name name = "hello enginehello enginehello engine\n";
 | 
						|
	pmr::Name name2("hello enginehello enginehello engine\n");
 | 
						|
	pmr::Name name3("hello enginehello enginehello engine222\n");
 | 
						|
	if (name == name2) {
 | 
						|
		std::string s1 = name.ToString();
 | 
						|
		std::string s2 = name2.ToString();
 | 
						|
		if (s1.c_str() == s2.c_str()) {
 | 
						|
			new(&pool)int(1);
 | 
						|
		}
 | 
						|
		if (s1 == s2) {
 | 
						|
			new(&pool)int(1);
 | 
						|
		}
 | 
						|
	}
 | 
						|
	int* a = new(&pool)int(1);
 | 
						|
	int* b = new(&pool)int(2);
 | 
						|
	int* c = new(&pool)int(3);
 | 
						|
	std::cout << "hello engine\n";
 | 
						|
} |