#include #include #ifndef BOOST_INTERPROCESS_NAMED_SEMAPHORE_USES_POSIX_SEMAPHORES #error "BOOST_INTERPROCESS_NAMED_SEMAPHORE_USES_POSIX_SEMAPHORES is disabled" #endif int main() { // should say "false" if the semaphore "doesntexist" doesn't exist std::cout << (boost::interprocess::named_semaphore::remove("doesntexist") ? "true" : "false") << std::endl; }