MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / detect_os

Function detect_os

tests/BS_thread_pool_test.cpp:676–687  ·  view source on GitHub ↗

* @brief Detect the operating system used to compile this program. * * @return A string describing the operating system. */

Source from the content-addressed store, hash-verified

674 * @return A string describing the operating system.
675 */
676std::string detect_os()
677{
678#if defined(__linux__)
679 return "Linux";
680#elif defined(_WIN32)
681 return "Windows";
682#elif defined(__APPLE__)
683 return "macOS";
684#else
685 return "Other";
686#endif
687}
688
689/**
690 * @brief Detect available C++ features and print them out.

Callers 1

show_introFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected