Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/variant/detail/cast_storage.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 //----------------------------------------------------------------------------- |
Chris@16 | 2 // boost variant/detail/cast_storage.hpp header file |
Chris@16 | 3 // See http://www.boost.org for updates, documentation, and revision history. |
Chris@16 | 4 //----------------------------------------------------------------------------- |
Chris@16 | 5 // |
Chris@16 | 6 // Copyright (c) 2003 |
Chris@16 | 7 // Eric Friedman |
Chris@16 | 8 // |
Chris@16 | 9 // Distributed under the Boost Software License, Version 1.0. (See |
Chris@16 | 10 // accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 11 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 12 |
Chris@16 | 13 #ifndef BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP |
Chris@16 | 14 #define BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP |
Chris@16 | 15 |
Chris@16 | 16 #include "boost/config.hpp" |
Chris@16 | 17 |
Chris@16 | 18 namespace boost { |
Chris@16 | 19 namespace detail { namespace variant { |
Chris@16 | 20 |
Chris@16 | 21 /////////////////////////////////////////////////////////////////////////////// |
Chris@16 | 22 // (detail) function template cast_storage |
Chris@16 | 23 // |
Chris@16 | 24 // Casts the given storage to the specified type, but with qualification. |
Chris@16 | 25 // |
Chris@16 | 26 |
Chris@16 | 27 template <typename T> |
Chris@101 | 28 inline T& cast_storage(void* storage) |
Chris@16 | 29 { |
Chris@16 | 30 return *static_cast<T*>(storage); |
Chris@16 | 31 } |
Chris@16 | 32 |
Chris@16 | 33 template <typename T> |
Chris@101 | 34 inline const T& cast_storage(const void* storage) |
Chris@16 | 35 { |
Chris@16 | 36 return *static_cast<const T*>(storage); |
Chris@16 | 37 } |
Chris@16 | 38 |
Chris@16 | 39 }} // namespace detail::variant |
Chris@16 | 40 } // namespace boost |
Chris@16 | 41 |
Chris@16 | 42 #endif // BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP |