Commit 57acc1c5 authored by David Fairbrother's avatar David Fairbrother
Browse files

Re #0 Remove old MSVC workaround and update comment

parent 688e3ae0
......@@ -45,18 +45,19 @@ public:
/// Copy constructor
Peak(const Peak &other);
// MSVC 2015 won't build with noexcept.
// error C2610: 'Mantid::DataObjects::Peak::Peak(Mantid::DataObjects::Peak &&)
// noexcept': is not a special member function which can be defaulted
// MSVC 2015/17 can build with noexcept = default however
// intellisense still incorrectly reports this as an error despite compiling.
// https://connect.microsoft.com/VisualStudio/feedback/details/1795240/visual-c-2015-default-move-constructor-and-noexcept-keyword-bug
// For that reason we still use the supplied default which should be noexcept
// once the above is fixed we can remove this workaround
#if defined(_MSC_VER) && _MSC_VER <= 1910
Peak(Peak &&);
Peak &operator=(Peak &&);
#elif defined(__GNUC__) && (__GNUC__ == 5)
Peak(Peak &&) = default;
Peak &operator=(Peak &&) = default;
#else
Peak(Peak &&) noexcept = default;
Peak &operator=(Peak &&) noexcept = default;
#else
Peak(Peak &&) noexcept;
Peak &operator=(Peak &&) noexcept;
#endif
// Construct a peak from a reference to the interface
......
......@@ -233,15 +233,6 @@ Peak::Peak(const Geometry::IPeak &ipeak)
}
}
#if defined(_MSC_VER) && _MSC_VER <= 1910
Peak::Peak(Peak &&) = default;
Peak &Peak::operator=(Peak &&) = default;
#elif defined(__GNUC__) && (__GNUC__ == 5)
// already defined in the header
#else
Peak::Peak(Peak &&) noexcept = default;
Peak &Peak::operator=(Peak &&) noexcept = default;
#endif
//----------------------------------------------------------------------------------------------
/** Set the incident wavelength of the neutron. Calculates the energy from this.
* Assumes elastic scattering.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment