C++ 11 int* 转换类型为 std::atomic<int>*

			template
			static inline std::atomic*				From(T* v) noexcept
			{
				std::atomic* p = static_cast*>(static_cast(v));
				std::atomic_init(p, *v);
				return p;
			}

你可能感兴趣的:(c++,算法,数据结构)