the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 49 lines 2.1 kB view raw
1// common_type.hpp ---------------------------------------------------------// 2 3// Copyright 2010 Vicente J. Botet Escriba 4 5// Distributed under the Boost Software License, Version 1.0. 6// See http://www.boost.org/LICENSE_1_0.txt 7 8#ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP 9#define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP 10 11#include <boost/config.hpp> 12 13//----------------------------------------------------------------------------// 14 15#include <boost/type_traits/add_rvalue_reference.hpp> 16//#include <boost/type_traits/add_lvalue_reference.hpp> 17 18//----------------------------------------------------------------------------// 19// // 20// C++03 implementation of // 21// Written by Vicente J. Botet Escriba // 22//~ 20.3.4 Function template declval [declval] 23//~ 1 The library provides the function template declval to simplify the definition of expressions which occur as 24//~ unevaluated operands. 25//~ 2 Remarks: If this function is used, the program is ill-formed. 26//~ 3 Remarks: The template parameter T of declval may be an incomplete type. 27//~ [ Example: 28 29//~ template <class To, class From> 30//~ decltype(static_cast<To>(declval<From>())) convert(From&&); 31 32//~ declares a function template convert which only participats in overloading if the type From can be 33//~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). �end 34//~ example ] 35// // 36//----------------------------------------------------------------------------// 37 38namespace boost { 39 40//#if !defined(BOOST_NO_RVALUE_REFERENCES) 41 template <typename T> 42 typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand 43//#else 44// template <typename T> 45// typename add_lvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand 46//#endif 47} // namespace boost 48 49#endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP