summaryrefslogtreecommitdiff
path: root/boost/variant/get.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/variant/get.hpp')
-rw-r--r--boost/variant/get.hpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/boost/variant/get.hpp b/boost/variant/get.hpp
index 3188a6547a..f3eb84dc29 100644
--- a/boost/variant/get.hpp
+++ b/boost/variant/get.hpp
@@ -15,19 +15,23 @@
#include <exception>
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/throw_exception.hpp"
-#include "boost/utility/addressof.hpp"
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/detail/element_index.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/element_index.hpp>
-#include "boost/type_traits/add_reference.hpp"
-#include "boost/type_traits/add_pointer.hpp"
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_pointer.hpp>
namespace boost {
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
//////////////////////////////////////////////////////////////////////////
// class bad_get
//
@@ -45,6 +49,10 @@ public: // std::exception implementation
}
};
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic pop
+#endif
+
//////////////////////////////////////////////////////////////////////////
// function template get<T>
@@ -139,7 +147,7 @@ relaxed_get(
)
{
typedef typename add_pointer<U>::type U_ptr;
- U_ptr result = relaxed_get<U>(&operand);
+ U_ptr result = relaxed_get<U>(boost::addressof(operand));
if (!result)
boost::throw_exception(bad_get());
@@ -155,7 +163,7 @@ relaxed_get(
)
{
typedef typename add_pointer<const U>::type U_ptr;
- U_ptr result = relaxed_get<const U>(&operand);
+ U_ptr result = relaxed_get<const U>(boost::addressof(operand));
if (!result)
boost::throw_exception(bad_get());