1#ifndef BOOST_THREAD_ONCE_HPP
2#define BOOST_THREAD_ONCE_HPP
3
4// once.hpp
5//
6// (C) Copyright 2006-7 Anthony Williams
7//
8// Distributed under the Boost Software License, Version 1.0. (See
9// accompanying file LICENSE_1_0.txt or copy at
10// http://www.boost.org/LICENSE_1_0.txt)
11
12#include <boost/thread/detail/config.hpp>
13#include <boost/thread/detail/platform.hpp>
14#if defined(BOOST_THREAD_PLATFORM_WIN32)
15#include <boost/thread/win32/once.hpp>
16#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
17#if defined BOOST_THREAD_ONCE_FAST_EPOCH
18#include <boost/thread/pthread/once.hpp>
19#elif defined BOOST_THREAD_ONCE_ATOMIC
20#include <boost/thread/pthread/once_atomic.hpp>
21#else
22#error "Once Not Implemented"
23#endif
24#else
25#error "Boost threads unavailable on this platform"
26#endif
27
28#include <boost/config/abi_prefix.hpp>
29
30namespace boost
31{
32 // template<class Callable, class ...Args> void
33 // call_once(once_flag& flag, Callable&& func, Args&&... args);
34template<typename Function>
35inline void call_once(Function func,once_flag& flag)
36//inline void call_once(void (*func)(),once_flag& flag)
37 {
38 call_once(flag,func);
39 }
40}
41
42#include <boost/config/abi_suffix.hpp>
43
44#endif
45