//	c0xHeaders.h - Some c++0x wrappers.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef C0XHEADERS_H_
#define C0XHEADERS_H_

///	We wrap some of the more useful c++0x classes so they can be used more cross-platformly (XCode, I'm looking at you).

#include <memory>

#ifndef OSX
#include <array>
#else
#include <boost/array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#endif

//------------------------------------------------------------------------------
///	Wraps std::array.
template <typename T, size_t N>
struct StdArray
{
#ifndef OSX
	typedef std::array<T, N> type;
#else
	typedef boost::array<T, N> type;
#endif
};

//------------------------------------------------------------------------------
///	Wraps std::shared_ptr.
template <typename T>
struct StdSharedPtr
{
#ifndef OSX
	typedef std::shared_ptr<T> type;
#else
	typedef boost::shared_ptr<T> type;
#endif
};

//------------------------------------------------------------------------------
///	Wraps std::weak_ptr.
template <typename T>
struct StdWeakPtr
{
#ifndef OSX
	typedef std::weak_ptr<T> type;
#else
	typedef boost::weak_ptr<T> type;
#endif
};

#endif
