text
stringlengths
24
1.04M
metadata
stringlengths
233
497
### File: examples/0016.dll/win32.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() { fast_io::native_dll_file dll(L"a.dll",fast_io::dll_mode::posix_rtld_lazy); [[maybe_unused]] auto proc{dll_load_symbol(dll,u8"GetProc")}; }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0016.dll/win32.cc", "license": "mit", "size": 235}
### File: examples/0017.network/dns.cc #include<fast_io.h> using namespace fast_io::io; int main(int argc, char const** argv) { if(argc < 2) { if(argc == 0) { return 1; } perr("Usage: ",::fast_io::mnp::os_c_str(*argv)," <domain>\n"); return 1; } fast_io::net_service service; fast_io::native_dns_file...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0017.network/dns.cc", "license": "mit", "size": 390}
### File: examples/0017.network/http.cc #include<fast_io.h> #include<fast_io_device.h> #include<string_view> using namespace fast_io::io; int main(int argc, char const** argv) { if(argc < 2) { if(argc == 0) { return 1; } perr("Usage: ",::fast_io::mnp::os_c_str(*argv)," <domain>\n"); return 1; } fast...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0017.network/http.cc", "license": "mit", "size": 1097}
### File: examples/0017.network/raw.cc #include<fast_io.h> int main() { fast_io::net_service service; fast_io::native_socket_file sock(fast_io::sock_family::inet,fast_io::sock_type::stream,fast_io::open_mode{},fast_io::sock_protocol::ip); constexpr fast_io::posix_sockaddr_in in{.sin_family=to_native_sock_family(fa...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0017.network/raw.cc", "license": "mit", "size": 452}
### File: examples/0017.network/tcp_client.cc #include<fast_io.h> int main() { fast_io::net_service service; fast_io::native_socket_file socket(tcp_connect(fast_io::ipv4{{127,0,0,1},2000})); transmit(fast_io::out(),socket); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0017.network/tcp_client.cc", "license": "mit", "size": 186}
### File: examples/0017.network/tcp_server.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() { fast_io::net_service service; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); for(fast_io::iobuf_socket_file file;;) try { file.reopen(tcp_accept(socket)); ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0017.network/tcp_server.cc", "license": "mit", "size": 406}
### File: examples/0018.i18n/l10n.cc #include<fast_io.h> #include<fast_io_i18n.h> using namespace fast_io::io; int main() { fast_io::native_l10n loc(u8""); println(imbue(loc,fast_io::c_stdout()),"Hello World ",-1248721947124LL," ",fast_io::mnp::boolalpha(true)); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0018.i18n/l10n.cc", "license": "mit", "size": 234}
### File: examples/0018.i18n/l10n_info.cc #include<fast_io.h> #include<fast_io_i18n.h> using namespace fast_io::io; int main() try { fast_io::native_l10n loc(u8""); println(imbue(loc,fast_io::c_stdout()),loc); } catch(fast_io::error e) { perrln(e); return 1; }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0018.i18n/l10n_info.cc", "license": "mit", "size": 227}
### File: examples/0019.llvm/construct_llvm_raw_fd_ostream_from_syscall.cc #include<fast_io.h> #include<fast_io_driver/llvm.h> using namespace fast_io::io; int main() { /* This is an example to explain how fast_io's files work with each other, and how you could use fast_io with existing FILE* or fstream apis */ #if ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0019.llvm/construct_llvm_raw_fd_ostream_from_syscall.cc", "license": "mit", "size": 2597}
### File: examples/0020.operating_system/limine/Makefile ISO_IMAGE = disk.iso .PHONY: all all: $(ISO_IMAGE) .PHONY: run run: $(ISO_IMAGE) qemu-system-x86_64 -M q35 -m 2G -cdrom $(ISO_IMAGE) limine: git clone https://github.com/limine-bootloader/limine.git --branch=v2.0-branch-binary --depth=1 make -C limine .PHO...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "vincent_personan/fast_io", "path": "examples/0020.operating_system/limine/Makefile", "license": "mit", "size": 903}
### File: examples/0020.operating_system/limine/kernel/Makefile KERNEL := kernel.elf CXX ?= g++ LD ?= ld CXXFLAGS ?= -Wall -Wextra -O3 -pipe -fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-ident -fwhole-program LDFLAGS ?= INTERNALLDFLAGS := \ -Tlinker.ld \ -nos...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "vincent_personan/fast_io", "path": "examples/0020.operating_system/limine/kernel/Makefile", "license": "mit", "size": 1216}
### File: examples/0020.operating_system/limine/kernel/kernel.cc #include <cstdint> #include <cstddef> #include "stivale2.h" #include "../../../include/fast_io.h" #include "../../../include/fast_io_driver/limine/kernel_console.h" using namespace fast_io::io; namespace fast_io_kernel_demo { // We need to tell the sti...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0020.operating_system/limine/kernel/kernel.cc", "license": "mit", "size": 5163}
### File: examples/0021.kernel_driver/linux/Makefile MOD_NAME := fast_io_module KERNEL := /lib/modules/$(shell uname -r)/build FLAGS := -Wall KMOD_DIR := $(shell pwd) CXX := g++ OBJECTS := kernel.o main.cc.o CONFIG_LTO = y ccflags-y += $(FLAGS) cxx-selected-flags = $(shell echo $(KBUILD_CFLAGS) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "vincent_personan/fast_io", "path": "examples/0021.kernel_driver/linux/Makefile", "license": "mit", "size": 1246}
### File: examples/0021.kernel_driver/linux/kernel.c #include <linux/kernel.h> #include <linux/init.h> #include <linux/module.h> MODULE_DESCRIPTION("fast_io_module"); MODULE_AUTHOR("Me"); MODULE_LICENSE("GPL"); extern int fast_io_dummy_init(void); extern void fast_io_dummy_exit(void); static int dummy_init(void) { ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "examples/0021.kernel_driver/linux/kernel.c", "license": "mit", "size": 412}
### File: examples/0021.kernel_driver/linux/main.cc #include<fast_io.h> #include<fast_io_driver/linux_kernel.h> using namespace fast_io::io; extern "C" int fast_io_dummy_init() noexcept { println(fast_io::u8kpr(),u8"Hello linux kernel from C++ fast_io, i know linus torvalds hates this: ", 20); return 0; } extern ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0021.kernel_driver/linux/main.cc", "license": "mit", "size": 382}
### File: examples/0021.kernel_driver/nt/Makefile CXX=g++ CXXFLAGS=-O3 -s -D_WIN32_WINNT=0x0502 FAST_IO_PATH=-I../../../include mydriver.sys:kernel_entry.cc $(CXX) -o mydriver.sys kernel_entry.cc -shared -fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables -ffreestanding -Wl,--subsystem,native...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "vincent_personan/fast_io", "path": "examples/0021.kernel_driver/nt/Makefile", "license": "mit", "size": 633}
### File: examples/0021.kernel_driver/nt/kernel_entry.cc #include<fast_io.h> #include<fast_io_driver/nt_kernel.h> using namespace fast_io::io; extern "C" std::uint32_t DriverEntry(::fast_io::win32::nt::driver_object* driverobject,::fast_io::win32::nt::utf16_string* registrypath) noexcept { println(fast_io::u8nt_dbg...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0021.kernel_driver/nt/kernel_entry.cc", "license": "mit", "size": 442}
### File: examples/0022.complex/complex.cc #include<complex> #include<fast_io.h> using namespace fast_io::io; int main() { std::complex<double> c(3.46e2,32424.436e-40); println(c,"\n",fast_io::mnp::hexfloat(c)); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0022.complex/complex.cc", "license": "mit", "size": 177}
### File: examples/0023.to/to.cc #include<fast_io.h> using namespace fast_io::io; int main() { constexpr __uint128_t s{fast_io::to<__uint128_t>(" 2424",fast_io::mnp::left(0,30,'0')," sgdjasdopgjdasgpojadsgpoadjsgpoadsjgopjaghdsoighasdioghadsoi")}; println(s); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0023.to/to.cc", "license": "mit", "size": 238}
### File: examples/0024.mfc/atl_file.cc #include<string> #include<atlfile.h> #include<fast_io_driver/mfc.h> #include<fast_io.h> using namespace fast_io::io; int main() { fast_io::atl_file file(u"atl.txt",fast_io::open_mode::out); print(file,"Hello World\n"); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0024.mfc/atl_file.cc", "license": "mit", "size": 228}
### File: examples/0024.mfc/mfc.cc #include<string> #include<atlstr.h> #include<fast_io_driver/mfc.h> #include<fast_io.h> using namespace fast_io::io; int main() { CString cstr(fast_io::concat_atl_cstring("wwadqwjdqwjopdqjdpoqwjdpqowdjqwpodjwqop ",241.42315235," asfaf")); print(cstr); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0024.mfc/mfc.cc", "license": "mit", "size": 260}
### File: examples/0024.mfc/mfc_file.cc #include<string> #include<afx.h> #include<fast_io_driver/mfc.h> #include<fast_io.h> using namespace fast_io::io; int main() { fast_io::mfc_file file(u"mfc.txt",fast_io::open_mode::out); print(file,"Hello World\n"); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0024.mfc/mfc_file.cc", "license": "mit", "size": 224}
### File: examples/0025.winrt/hstring.cc #include<winrt/base.h> #include<fast_io.h> using namespace fast_io::io; int main() { println(fast_io::wconcat_winrt_hstring(L"qqwdwq",1234,L"asfasf")); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0025.winrt/hstring.cc", "license": "mit", "size": 160}
### File: examples/0025.winrt/hstring_get.cc #include<winrt/base.h> #include<fast_io.h> using namespace fast_io::io; int main() { winrt::hstring hstr; scan(fast_io::mnp::strlike_get(hstr)); println(hstr); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0025.winrt/hstring_get.cc", "license": "mit", "size": 170}
### File: examples/0026.lua/Makefile SYSROOT = $(HOME)/cross/wasm32-wasi WASM2LUA = wasm2lua CXX = clang++ LUAJIT = luajit hello_fast_io.lua:hello_fast_io $(WASM2LUA) hello_fast_io hello_fast_io.lua -m, --minify 3 hello_fast_io:hello_fast_io.cc $(CXX) -o hello_fast_io hello_fast_io.cc -Ofast -std=c++2b -s -flto -fus...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "vincent_personan/fast_io", "path": "examples/0026.lua/Makefile", "license": "mit", "size": 541}
### File: examples/0026.lua/hello_fast_io.cc #include<fast_io.h> using namespace fast_io::io; int main() { print(fast_io::out(),"Hello Lua World from C++ 23 fast_io library. Thank to wasm2lua!\n"); #if 0 print("Hello Lua World from C++ 23 fast_io library. Thank to wasm2lua!\n"); /* will cause out of memory acces...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0026.lua/hello_fast_io.cc", "license": "mit", "size": 574}
### File: examples/0026.lua/luabit.lua local M = {_TYPE='module', _NAME='bitop.funcs', _VERSION='1.0-0'} local floor = math.floor local MOD = 2^32 local MODM = MOD-1 local function memoize(f) local mt = {} local t = setmetatable({}, mt) function mt:__index(k) local v = f(k) t[k] = v return v en...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "vincent_personan/fast_io", "path": "examples/0026.lua/luabit.lua", "license": "mit", "size": 6804}
### File: examples/0026.lua/main.lua if _G.bit == nil then local bit = dofile("luabit.lua") _G.bit=bit end local wasi = dofile("wasilib.lua") --[[replace this with your wasi implementation. Just copy it from wasm2lua]] local module = dofile("hello_fast_io.lua") module.imports.wasi_snapshot_preview1=wasi(module.memo...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "vincent_personan/fast_io", "path": "examples/0026.lua/main.lua", "license": "mit", "size": 326}
### File: examples/0027.filelock/buffer_lock.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() { fast_io::obuf_file pf(u8"example.txt",fast_io::open_mode::app); fast_io::file_lock_guard g(file_lock(pf),fast_io::flock_request_l64{}); for(std::size_t i{};i!=1000000;++i) { ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0027.filelock/buffer_lock.cc", "license": "mit", "size": 321}
### File: examples/0027.filelock/buffered_file_with_file_lock.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() try { fast_io::obuf_file pf(u8"example.txt",fast_io::open_mode::app); fast_io::file_lock_guard g(file_lock(pf.handle),fast_io::flock_request_l64{}); fast_io::io_f...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0027.filelock/buffered_file_with_file_lock.cc", "license": "mit", "size": 416}
### File: examples/0027.filelock/filelock.cc #include<fast_io.h> using namespace fast_io::io; int main() try { fast_io::native_file pf(u8"example.txt",fast_io::open_mode::app); for(std::size_t i{};i!=1000000;++i) { fast_io::file_lock_guard g(file_lock(pf),fast_io::flock_request_l64{}); print(pf,"Hello "); p...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0027.filelock/filelock.cc", "license": "mit", "size": 352}
### File: examples/0027.filelock/filelock_request.cc #include<fast_io.h> using namespace fast_io::io; int main() try { fast_io::native_file pf(u8"example.txt",fast_io::open_mode::app); for(std::size_t i{};i!=1000000;++i) { fast_io::file_lock_guard g(file_lock(pf),fast_io::flock_request_l64 {.type=fast_io::fil...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0027.filelock/filelock_request.cc", "license": "mit", "size": 456}
### File: examples/0028.python/pybytes.cc #include<fast_io.h> #include<fast_io_driver/python/pyobject.h> using namespace fast_io::io; int main() { auto obj{fast_io::concat_pyobject_file("Hello World\n")}; print(obj); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0028.python/pybytes.cc", "license": "mit", "size": 185}
### File: examples/0029.containers/vector.cc #if defined(USE_STD) #include<vector> #include<cstdint> namespace test { template<typename T> using vector = ::std::vector<T>; } #else #include<fast_io_dsal/vector.h> namespace test { template<typename T> using vector = ::fast_io::vector<T>; } #endif /* Unfortunately fast...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0029.containers/vector.cc", "license": "mit", "size": 632}
### File: examples/0029.containers/vectorvector.cc #if defined(USE_STD) #include<vector> #include<cstdint> namespace test { template<typename T> using vector = ::std::vector<T>; } #else #include<fast_io_dsal/vector.h> namespace test { template<typename T> using vector = ::fast_io::vector<T>; } #endif /* Unfortunatel...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0029.containers/vectorvector.cc", "license": "mit", "size": 499}
### File: examples/0030.binary_serialization/leb128.cc #include<string> #include<fast_io.h> using namespace fast_io::io; int main() { using namespace fast_io::mnp; constexpr std::size_t v{142142}; auto str{fast_io::u8concat(leb128_put(v))}; println(rgvw(str,"\t")); str=fast_io::u8concat(leb128_put(PTRDIFF_MAX))...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0030.binary_serialization/leb128.cc", "license": "mit", "size": 370}
### File: examples/0030.binary_serialization/leb128_input.cc #include <string> #include <limits> #include <fast_io.h> using namespace fast_io::io; int main() { std::uint64_t u1, u2; std::int64_t i1, i2; std::string buffer(10000, '\0'); u1 = 14142; using namespace fast_io::mnp; print(fast_io::obuffer_view{ buffe...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0030.binary_serialization/leb128_input.cc", "license": "mit", "size": 871}
### File: examples/0030.binary_serialization/lec559_lebe.cc #include <string> #include <limits> #include <source_location> #include <fast_io.h> using namespace fast_io::io; template<typename T> inline void test(T u1) { T u2; using namespace fast_io::mnp; auto buffer{fast_io::concat(iec559_le_put(u1))}; scan(fast_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0030.binary_serialization/lec559_lebe.cc", "license": "mit", "size": 760}
### File: examples/0030.binary_serialization/wasm.cc #include <string> #include <limits> #include <source_location> #include <fast_io.h> /* https://github.com/sunfishcode/wasm-reference-manual/blob/master/WebAssembly.md#primitive-encoding-types */ using namespace fast_io::io; template<typename T> inline void test(T ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0030.binary_serialization/wasm.cc", "license": "mit", "size": 1635}
### File: examples/0031.concat/concat.cc #include<string> #include<fast_io.h> using namespace fast_io::io; int main() { std::string str=fast_io::concat("The " "fart is ",3," years old.\n" "Leeroy!!!!","Jenkins!!!\n"); print(str); }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0031.concat/concat.cc", "license": "mit", "size": 200}
### File: examples/0031.concat/concat_code_cvt.cc #include<string> #include<string_view> #include<fast_io.h> using namespace fast_io::io; int main() { std::u16string u16str=fast_io::u16concat(u"The fart is ",18); char16_t const* cstylestr{u" years old hot girl😍.\n"}; constexpr std::u8string_view simp{u8"Don't be ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0031.concat/concat_code_cvt.cc", "license": "mit", "size": 511}
### File: examples/0032.parse_by_scan/parse_by_scan.cc #include<fast_io.h> using namespace fast_io::io; int main() { constexpr char8_t const testbuffer[]{u8"412741298414 1235321525"}; ::std::uint_least64_t val; auto [position,code] = ::fast_io::parse_by_scan(testbuffer,testbuffer+sizeof(testbuffer),val); ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "examples/0032.parse_by_scan/parse_by_scan.cc", "license": "mit", "size": 408}
### File: fuzzing/0000.write/c_file_unlocked.cc #include<fast_io.h> fast_io::c_file_unlocked obf("/dev/null",fast_io::open_mode::out); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { write(obf,ptr,ptr+n); return 0; }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/c_file_unlocked.cc", "license": "mit", "size": 229}
### File: fuzzing/0000.write/crc32.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::crc32_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexc...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/crc32.cc", "license": "mit", "size": 483}
### File: fuzzing/0000.write/md5.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::md5_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/md5.cc", "license": "mit", "size": 481}
### File: fuzzing/0000.write/obuf_file.cc #include<fast_io.h> #include<fast_io_device.h> fast_io::obuf_file obf("/dev/null"); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { write(obf,ptr,ptr+n); return 0; }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/obuf_file.cc", "license": "mit", "size": 226}
### File: fuzzing/0000.write/ogb18030.cc #include<fast_io.h> #include<fast_io_unit/gb18030.h> #include<fast_io_device.h> fast_io::ogb18030_file obf("/dev/null"); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { write(obf,ptr,ptr+n); return 0; }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/ogb18030.cc", "license": "mit", "size": 263}
### File: fuzzing/0000.write/ossl_sha512.cc #include<fast_io.h> #include<fast_io_device.h> #include<fast_io_driver/openssl_driver.h> thread_local fast_io::ossl::sha512_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t con...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/ossl_sha512.cc", "license": "mit", "size": 505}
### File: fuzzing/0000.write/sha1.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha1_context ctx; thread_local fast_io::u32obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noex...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha1.cc", "license": "mit", "size": 485}
### File: fuzzing/0000.write/sha224.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha224_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noe...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha224.cc", "license": "mit", "size": 484}
### File: fuzzing/0000.write/sha256.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha256_context ctx; thread_local fast_io::u32obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha256.cc", "license": "mit", "size": 487}
### File: fuzzing/0000.write/sha384.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha384_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noe...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha384.cc", "license": "mit", "size": 484}
### File: fuzzing/0000.write/sha384_raw_bytes.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha384_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::siz...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha384_raw_bytes.cc", "license": "mit", "size": 494}
### File: fuzzing/0000.write/sha512.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha512_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noe...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha512.cc", "license": "mit", "size": 484}
### File: fuzzing/0000.write/sha512_224.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha512_224_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha512_224.cc", "license": "mit", "size": 488}
### File: fuzzing/0000.write/sha512_256.cc #include<fast_io.h> #include<fast_io_crypto.h> #include<fast_io_device.h> thread_local fast_io::sha512_256_context ctx; thread_local fast_io::obuf_file obf(u8"/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0000.write/sha512_256.cc", "license": "mit", "size": 488}
### File: fuzzing/0001.read/fuzzer_client.cc #include<fast_io.h> #include<fast_io_device.h> fast_io::net_service serivce; thread_local fast_io::iobuf_socket_file soc(fast_io::tcp_connect(fast_io::ipv4{{127,0,0,1},2000})); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { write(...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/fuzzer_client.cc", "license": "mit", "size": 305}
### File: fuzzing/0001.read/fuzzer_client_no_buffer.cc #include<fast_io.h> #include<fast_io_device.h> fast_io::net_service serivce; thread_local fast_io::native_socket_file soc(fast_io::tcp_connect(fast_io::ipv4{{127,0,0,1},2000})); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcep...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/fuzzer_client_no_buffer.cc", "license": "mit", "size": 306}
### File: fuzzing/0001.read/line_scanner.cc #include<string_view> #include<fast_io.h> #include<fast_io_device.h> #include<fast_io_crypto.h> using namespace fast_io::io; int main() { fast_io::net_service serivce; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); fast_io::sha256_context ctx;//use sha25...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/line_scanner.cc", "license": "mit", "size": 777}
### File: fuzzing/0001.read/read.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() { fast_io::net_service serivce; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); fast_io::obuf_file null_device(u8"/dev/null"); fast_io::native_file logs(u8"log.txt",fast_io::o...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/read.cc", "license": "mit", "size": 546}
### File: fuzzing/0001.read/read_transmit_to_igb18030.cc #include<fast_io.h> #include<fast_io_device.h> #include<fast_io_crypto.h> #include<fast_io_unit/gb18030.h> using namespace fast_io::io; int main() { fast_io::net_service serivce; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); fast_io::sha256...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/read_transmit_to_igb18030.cc", "license": "mit", "size": 737}
### File: fuzzing/0001.read/read_transmit_to_sha256.cc #include<fast_io.h> #include<fast_io_device.h> #include<fast_io_crypto.h> using namespace fast_io::io; int main() { fast_io::net_service serivce; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); fast_io::sha256_context ctx;//use sha256 to preven...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0001.read/read_transmit_to_sha256.cc", "license": "mit", "size": 670}
### File: fuzzing/0002.http_header/header.cc #include<string_view> #include<fast_io.h> #include<fast_io_device.h> thread_local std::size_t context{}; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { ::fast_io::basic_http_header_buffer<char> buffer; auto ret{::fast_io::details...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0002.http_header/header.cc", "license": "mit", "size": 425}
### File: fuzzing/0003.concat/basic_concat_buffer.cc #include<fast_io.h> extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { ::fast_io::details::basic_concat_buffer<char> buffer; auto oref{io_strlike_ref(fast_io::io_alias,buffer)}; for(std::size_t i{};i!=16;++i) write(oref,pt...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0003.concat/basic_concat_buffer.cc", "license": "mit", "size": 298}
### File: fuzzing/0003.concat/concat.cc #include<string> #include<string_view> #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); thread_local fast_io::wobuf_file wobf(u8"/dev/null"); thread_local fast_io::u8obuf_file u8obf(u8"/dev/null"); thread_local fast_io::u16obuf_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0003.concat/concat.cc", "license": "mit", "size": 1450}
### File: fuzzing/0004.filesystem/find_dot_and_sep_extension.cc #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); extern "C" int LLVMFuzzerTestOneInput(char8_t const* ptr,std::size_t n) noexcept { auto e{::fast_io::details::find_dot_and_sep<false,char8_t,char8_t>(ptr...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0004.filesystem/find_dot_and_sep_extension.cc", "license": "mit", "size": 312}
### File: fuzzing/0004.filesystem/find_dot_and_sep_extension_sep.cc #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); extern "C" int LLVMFuzzerTestOneInput(char const* ptr,std::size_t n) noexcept { auto e{::fast_io::details::find_dot_and_sep<false,char8_t,char>(ptr,n...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0004.filesystem/find_dot_and_sep_extension_sep.cc", "license": "mit", "size": 306}
### File: fuzzing/0004.filesystem/find_dot_and_sep_stem.cc #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); extern "C" int LLVMFuzzerTestOneInput(char8_t const* ptr,std::size_t n) noexcept { auto e{::fast_io::details::find_dot_and_sep<true,char8_t,char8_t>(ptr,n)}; ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0004.filesystem/find_dot_and_sep_stem.cc", "license": "mit", "size": 311}
### File: fuzzing/0004.filesystem/find_dot_and_sep_stem2.cc #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); extern "C" int LLVMFuzzerTestOneInput(char16_t const* ptr,std::size_t n) noexcept { auto e{::fast_io::details::find_dot_and_sep<true,char16_t,char16_t>(ptr,n...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0004.filesystem/find_dot_and_sep_stem2.cc", "license": "mit", "size": 316}
### File: fuzzing/0004.filesystem/my_rfind_dot.cc #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf(u8"/dev/null"); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { auto e{::fast_io::details::my_rfind_dot(ptr,ptr+n)}; write(obf,ptr,e); ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0004.filesystem/my_rfind_dot.cc", "license": "mit", "size": 284}
### File: fuzzing/0005.scanners/line_scanner_contiguous.cc #include<string_view> #include<fast_io.h> #include<fast_io_device.h> thread_local fast_io::obuf_file obf("/dev/null"); extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr,std::size_t n) noexcept { fast_io::ibuffer_view view(reinterpret_cast<char c...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0005.scanners/line_scanner_contiguous.cc", "license": "mit", "size": 403}
### File: fuzzing/0006.serializations/le_get.cc #include<fast_io.h> #include<fast_io_device.h> using namespace fast_io::io; int main() { fast_io::net_service serivce; fast_io::native_socket_file socket(fast_io::tcp_listen(2000)); fast_io::obuf_file null_device(u8"/dev/null"); fast_io::native_file logs(u8"log.txt...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0006.serializations/le_get.cc", "license": "mit", "size": 575}
### File: fuzzing/0007.containers/vector.cc #include <fast_io.h> #include <fast_io_dsal/vector.h> struct not_a_char_t { char content; not_a_char_t(char c) noexcept : content(c) {} not_a_char_t(std::uint8_t c) noexcept : content(static_cast<char>(c)) {} }; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t* data, ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0007.containers/vector.cc", "license": "mit", "size": 773}
### File: fuzzing/0008.timestamp/basic_timestamp.cc #include <fast_io.h> thread_local fast_io::timestamp_scan_state_t<char> state{}; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr, std::size_t n) noexcept { fast_io::unix_timestamp tsp{}; auto begin{ reinterpret_cast<char const*>(ptr) }; auto end{ be...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0008.timestamp/basic_timestamp.cc", "license": "mit", "size": 465}
### File: fuzzing/0008.timestamp/iso8601.cc #include <fast_io.h> thread_local fast_io::timestamp_scan_state_t<char> state{}; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr, std::size_t n) noexcept { fast_io::iso8601_timestamp tsp{}; auto begin{ reinterpret_cast<char const*>(ptr) }; auto end{ begin +...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0008.timestamp/iso8601.cc", "license": "mit", "size": 461}
### File: fuzzing/0009.ipv6/validate_print.cc #include <cstring> #include <string> #include <fast_io.h> #include <fast_io_device.h> thread_local fast_io::obuf_file obf("/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr, std::size_t n) noexcept { fast_io:: #if de...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0009.ipv6/validate_print.cc", "license": "mit", "size": 637}
### File: fuzzing/0009.ipv6/validate_scan.cc #include <cstring> #include <string> #include <fast_io.h> #include <tuple> extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr, std::size_t n) noexcept { fast_io:: #if defined(TEST_INADDR) posix_in_addr #elif defined(IPV4) ipv4 #elif defined(TEST_IN6ADDR) p...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0009.ipv6/validate_scan.cc", "license": "mit", "size": 942}
### File: fuzzing/0009.ipv6/validate_scan2.cc #define FAST_IO_SANITIZE_IO_BUFFER #include <cstring> #include <string> #include <fast_io.h> #include <fast_io_device.h> thread_local fast_io::obuf_file obf("/dev/null"); using namespace fast_io::io; extern "C" int LLVMFuzzerTestOneInput(std::uint8_t const* ptr, std::siz...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "fuzzing/0009.ipv6/validate_scan2.cc", "license": "mit", "size": 1066}
### File: include/fast_io.h #pragma once #if !defined(__cplusplus) #error "You are not using a C++ compiler" #endif #if !defined(__cpp_concepts) #error "fast_io requires at least C++20 standard compiler." #else #include"fast_io_hosted.h" #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io.h", "license": "mit", "size": 15915}
### File: include/fast_io_concept.h #pragma once #undef min #undef max //fast_io_concept.h allows you define your device and type without compilation time penalty #if !defined(__cplusplus) #error "You must be using a C++ compiler" #endif #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warnin...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_concept.h", "license": "mit", "size": 836}
### File: include/fast_io_core.h #pragma once //fast_io_core.h is required to be usable in freestanding environment with EVEN dynamic memory allocation and exceptions are disabled. #if !defined(__cplusplus) #error "You are not using a C++ compiler" #endif #if !defined(__cpp_concepts) #error "fast_io requires at leas...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core.h", "license": "mit", "size": 3694}
### File: include/fast_io_core_impl/alias.h #pragma once namespace fast_io { namespace details { struct cannot_output_type { inline explicit constexpr cannot_output_type() noexcept = default; }; } template<typename T> inline constexpr decltype(auto) io_print_alias(T&& t) noexcept { using no_cvref_t=std::remove_c...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/alias.h", "license": "mit", "size": 1805}
### File: include/fast_io_core_impl/allocation/adapters.h #pragma once namespace fast_io { namespace details { #include"has_methods_detect.h" template<typename alloc> concept has_default_alignment_impl = requires(::std::size_t n) { alloc::default_alignment; }; template<typename alloc> inline constexpr ::std::si...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/adapters.h", "license": "mit", "size": 17051}
### File: include/fast_io_core_impl/allocation/allocator_adapter_flags.h #pragma once enum class allocator_adapter_flags { none=0, record_size=1, secure_clear=2 }; constexpr allocator_adapter_flags operator&(allocator_adapter_flags x, allocator_adapter_flags y) noexcept { using utype = typename std::underlying_type<...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/allocator_adapter_flags.h", "license": "mit", "size": 1564}
### File: include/fast_io_core_impl/allocation/c_malloc.h #pragma once namespace fast_io { class c_malloc_allocator { public: #if __has_cpp_attribute(__gnu__::__returns_nonnull__) [[__gnu__::__returns_nonnull__]] #endif static inline void* allocate(::std::size_t n) noexcept { if(n==0) { n=1; } void* p =...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/c_malloc.h", "license": "mit", "size": 1438}
### File: include/fast_io_core_impl/allocation/custom.h #pragma once namespace fast_io { class custom_global_allocator; #if defined(FAST_IO_DISABLE_CUSTOM_THREAD_LOCAL_ALLOCATOR) using custom_thread_local_allocator = custom_global_allocator #else class custom_thread_local_allocator; #endif }
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/custom.h", "license": "mit", "size": 244}
### File: include/fast_io_core_impl/allocation/has_methods_detect.h #pragma once template<typename alloc> concept has_allocate_impl = requires(::std::size_t n) { {alloc::allocate(n)}->::std::same_as<void*>; }; template<typename alloc> concept has_allocate_aligned_impl = requires(::std::size_t n) { {alloc::allocate...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/has_methods_detect.h", "license": "mit", "size": 2492}
### File: include/fast_io_core_impl/allocation/impl.h #pragma once #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__WINE__) #include"win32_heapalloc.h" #include"nt_rtlheapalloc.h" #if defined(_MSC_VER) && !defined(__clang__) #include"msvc/impl.h" #endif #endif #if ((__STDC_HOSTED__==1 && (!defined(_GLIBCXX_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/impl.h", "license": "mit", "size": 1910}
### File: include/fast_io_core_impl/allocation/linux_kernel.h #pragma once namespace fast_io { extern void* linux_kernel_kmalloc(::std::size_t,int unsigned) noexcept __asm__("__kmalloc"); extern void* linux_kernel_krealloc(void const*,::std::size_t,int unsigned) noexcept __asm__("krealloc"); extern void linux_kern...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/linux_kernel.h", "license": "mit", "size": 1420}
### File: include/fast_io_core_impl/allocation/mimalloc_driver.h #pragma once namespace fast_io { namespace mimalloc { #if defined(_MSC_VER) && !defined(__clang__) __declspec(dllimport) #elif (__has_cpp_attribute(__gnu__::__dllimport__)&&!defined(__WINE__)) [[__gnu__::__dllimport__]] #endif #if __has_cpp_attribute(_...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/mimalloc_driver.h", "license": "mit", "size": 4025}
### File: include/fast_io_core_impl/allocation/msvc/impl.h #pragma once #if SIZE_MAX > UINT_LEAST32_MAX #include"msvc_linker_64.h" #elif defined(__x86__) || defined(_M_IX86) || defined(__i386__) #include"msvc_linker_32_i686.h" #else #include"msvc_linker_32.h" #endif
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/msvc/impl.h", "license": "mit", "size": 212}
### File: include/fast_io_core_impl/allocation/msvc/msvc_linker_32.h #pragma once #pragma comment(linker,"/alternatename:__imp_?HeapAlloc@win32@fast_io@@YAPAXPAXII@Z=__imp_HeapAlloc") #pragma comment(linker,"/alternatename:__imp_?HeapFree@win32@fast_io@@YAHPAXI0@Z=__imp_HeapFree") #pragma comment(linker,"/alternatena...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/msvc/msvc_linker_32.h", "license": "mit", "size": 874}
### File: include/fast_io_core_impl/allocation/msvc/msvc_linker_32_i686.h #pragma once #pragma comment(linker,"/alternatename:__imp_?HeapAlloc@win32@fast_io@@YGPAXPAXII@Z=__imp__HeapAlloc@12") #pragma comment(linker,"/alternatename:__imp_?HeapFree@win32@fast_io@@YGHPAXI0@Z=__imp__HeapFree@12") #pragma comment(linker,...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/msvc/msvc_linker_32_i686.h", "license": "mit", "size": 904}
### File: include/fast_io_core_impl/allocation/msvc/msvc_linker_64.h #pragma once #pragma comment(linker,"/alternatename:__imp_?HeapAlloc@win32@fast_io@@YAPEAXPEAXI_K@Z=__imp_HeapAlloc") #pragma comment(linker,"/alternatename:__imp_?HeapFree@win32@fast_io@@YAHPEAXI0@Z=__imp_HeapFree") #pragma comment(linker,"/alterna...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/msvc/msvc_linker_64.h", "license": "mit", "size": 890}
### File: include/fast_io_core_impl/allocation/nt_rtlheapalloc.h #pragma once #if defined(_MSC_VER) && !defined(_KERNEL_MODE) && !defined(_WIN32_WINDOWS) #pragma comment(lib,"ntdll.lib") #endif namespace fast_io { namespace nt { #if defined(_MSC_VER) && !defined(__clang__) __declspec(dllimport) #elif (__has_cpp_att...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/nt_rtlheapalloc.h", "license": "mit", "size": 6340}
### File: include/fast_io_core_impl/allocation/win32_heapalloc.h #pragma once namespace fast_io { namespace win32 { #if defined(_MSC_VER) && !defined(__clang__) __declspec(dllimport) #elif (__has_cpp_attribute(__gnu__::__dllimport__)&&!defined(__WINE__)) [[__gnu__::__dllimport__]] #endif #if (__has_cpp_attribute(__g...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/allocation/win32_heapalloc.h", "license": "mit", "size": 4980}
### File: include/fast_io_core_impl/asan_support.h #pragma once namespace fast_io::details { enum class asan_state { none, activate, current= #if (defined(_GLIBCXX_DEBUG) || defined(_DEBUG) || _ITERATOR_DEBUG_LEVEL>=2 || _LIBCPP_DEBUG >= 2 || defined(FAST_IO_SANITIZE_IO_BUFFER)) #if defined(__SANITIZE_ADDRESS__) act...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/asan_support.h", "license": "mit", "size": 412}
### File: include/fast_io_core_impl/black_hole.h #pragma once namespace fast_io { //black_hole is a helper class which helps you remove device requirement for iobuf or iotransform. //sha256 for example. You do not need a real device. You want to send all your bits to black hole template<std::integral ch_type> struc...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/black_hole.h", "license": "mit", "size": 754}
### File: include/fast_io_core_impl/buffer_view.h #pragma once namespace fast_io { template<std::integral ch_type> struct basic_ibuffer_view { using char_type = ch_type; char_type const *begin_ptr{}; char_type const *curr_ptr{}; char_type const *end_ptr{}; constexpr basic_ibuffer_view() noexcept = default; tem...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/buffer_view.h", "license": "mit", "size": 5677}
### File: include/fast_io_core_impl/char_category.h #pragma once namespace fast_io::char_category { template<std::integral char_type> inline constexpr bool is_c_alnum(char_type ch) noexcept { if constexpr(std::same_as<char,char_type>) switch(ch){case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "include/fast_io_core_impl/char_category.h", "license": "mit", "size": 29592}