1 /* 2 * Copyright 2014 Andrey Semashev 3 * 4 * Distributed under the Boost Software License, Version 1.0. 5 * See accompanying file LICENSE_1_0.txt or copy at 6 * https://www.boost.org/LICENSE_1_0.txt 7 */ 8 /* 9 * This is a part of the test for a workaround for MSVC 12 (VS2013) optimizer bug 10 * which causes incorrect SIMD code generation for operator==. See: 11 * 12 * https://svn.boost.org/trac/boost/ticket/8509#comment:3 13 * https://connect.microsoft.com/VisualStudio/feedbackdetail/view/981648#tabs 14 * 15 * The header contains common definitions for the two source files. 16 */ 17 #include <boost/uuid/uuid.hpp> 18 using boost::uuids::uuid; 19 class headerProperty 20 { 21 public: ~headerProperty()22virtual ~headerProperty() {} 23 }; 24 class my_obj: 25 public headerProperty 26 { 27 public: 28 // This char tmp[8] forces the following uuid to be misaligned. 29 char tmp[8]; 30 // This m_uuid is misaligned (not 16-byte aligned) and causes the != operator to crash. 31 uuid m_uuid; get_marker_id() const32const uuid &get_marker_id() const { return m_uuid; } get_id() const33uuid get_id() const { return m_uuid; } 34 }; 35