#ifndef _PARAM_QUALIFIERS_HPP_
#define _PARAM_QUALIFIERS_HPP_

#include <alib/set>
#include <alib/type_traits>

namespace abstraction {

class ParamQualifiers {
public:
	enum class ParamQualifier {
		CONST,
		LREF,
		RREF,
	};

	template < class Param >
	static ext::set < ParamQualifier > paramQualifiers ( ) {
		ext::set < ParamQualifier > res;

		if constexpr ( std::is_lvalue_reference < Param >::value )
			res.insert ( ParamQualifier::LREF );

		if constexpr ( std::is_rvalue_reference < Param >::value )
			res.insert ( ParamQualifier::RREF );

		if constexpr ( std::is_const < typename std::remove_reference < Param >::type >::value )
			res.insert ( ParamQualifier::CONST );

		return res;
	}

	friend std::ostream & operator << ( std::ostream & os, const ParamQualifier & paramQualifier );
};

} /* namespace abstraction */

#endif // _PARAM_QUALIFIERS_HPP_
