diff --git a/.gitignore b/.gitignore index a94fe8f..94e8e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /build.conf build/ +/tools/a.out diff --git a/tools/test_cxx.cc b/tools/test_cxx.cc new file mode 100644 index 0000000..ba74a36 --- /dev/null +++ b/tools/test_cxx.cc @@ -0,0 +1,29 @@ +#include + +template struct Supplier { + char data[5]{ 'h', 'e', 'l', 'l', 'o' }; + uint8_t pos{ 0 }; + + char next() + { + pos++; + if (pos >= SIZE) { + return -34; + } + + return data[pos]; + } +}; + +int main() +{ + std::cout << "BEGIN" << std::endl; + Supplier<5> sup{}; + + + while (char c = true) { + std::cout << c; + } + + std::cout << "END" << std::endl; +} \ No newline at end of file