diff options
Diffstat (limited to 'src/compat/cast.hpp')
-rw-r--r-- | src/compat/cast.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compat/cast.hpp b/src/compat/cast.hpp index 8db486f..35dbc62 100644 --- a/src/compat/cast.hpp +++ b/src/compat/cast.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_COMPAT_CAST_HPP -#define TMWA_COMPAT_CAST_HPP +#pragma once // cast.hpp - Change the type of a variable. // // Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com> @@ -19,12 +18,14 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -# include "../sanity.hpp" +#include "fwd.hpp" -# include <utility> -# include <type_traits> +#include <utility> +#include <type_traits> +namespace tmwa +{ template<class T> const T& const_(T& t) { @@ -68,5 +69,4 @@ typename std::remove_pointer<T>::type *sign_cast(U *u) static_assert(sizeof(T_) == sizeof(U), "sign cast must be same size"); return reinterpret_cast<T_ *>(u); } - -#endif // TMWA_COMPAT_CAST_HPP +} // namespace tmwa |