Opened 7 years ago
Closed 4 years ago
#11479 closed Bugs (duplicate)
BOOST_DEFAULTED_FUNCTION does not work on Visual Studio 2013
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | config |
| Version: | Boost 1.58.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The following use case
struct Foo {
Foo(const Foo& other) : uptr(new int(*other.uptr)) {} BOOST_DEFAULTED_FUNCTION(Foo(Foo&& other), : uptr(std::move(other.uptr)){} ); std::unique_ptr<int> uptr;
};
when compiled with Visual Studio 2013, causes the following error:
error C2610: 'Foo::Foo(Foo &&)' : is not a special member function which can be defaulted
VS 2012 picks up the fallback, so it works.
It could be because of the following documented defect: https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
Change History (2)
comment:1 by , 7 years ago
| Component: | None → config |
|---|---|
| Owner: | set to |
comment:2 by , 4 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

I think this duplicates https://svn.boost.org/trac10/ticket/10215