From dc9edc458cf1936511fc2e503469045e4d43ac31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 26 Dec 2021 22:25:05 +0100 Subject: [PATCH] Fixes #47: ("MSVC C5243: 'member_function_ptr': using incomplete class can cause potential ODR violation ...") --- doc/move.qbk | 1 + include/boost/move/detail/type_traits.hpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/move.qbk b/doc/move.qbk index bd2b907..e83f0b7 100644 --- a/doc/move.qbk +++ b/doc/move.qbk @@ -806,6 +806,7 @@ Special thanks to: * Fixed bugs: * [@https://github.com/boostorg/move/pull/46 Git Issue #46: ['"Include when BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE is defined"]]. + * [@https://github.com/boostorg/move/issues/47 Git Issue #47: ['"MSVC C5243: 'member_function_ptr': using incomplete class can cause potential ODR violation ..."]]. * [@https://github.com/boostorg/move/issues/48 Git Issue #48: ['"MSVC warning C4643: Forward declaring 'nothrow_t' in namespace std is not permitted by the C++ Standard"]]. [endsect] diff --git a/include/boost/move/detail/type_traits.hpp b/include/boost/move/detail/type_traits.hpp index e44db12..e5b7684 100644 --- a/include/boost/move/detail/type_traits.hpp +++ b/include/boost/move/detail/type_traits.hpp @@ -1102,7 +1102,7 @@ struct alignment_of class alignment_dummy; typedef void (*function_ptr)(); typedef int (alignment_dummy::*member_ptr); -typedef int (alignment_dummy::*member_function_ptr)(); + struct alignment_struct { long double dummy[4]; }; @@ -1125,7 +1125,6 @@ union max_align long double long_double_[4]; alignment_dummy *unknown_class_ptr_; function_ptr function_ptr_; - member_function_ptr member_function_ptr_; alignment_struct alignment_struct_; };