[PATCH] D19700: [libcxx] [test] nasty_mutex::operator& should return nullptr, like nasty_list above it.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 17:13:11 PDT 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] nasty_mutex::operator& should return nullptr, like nasty_list above it.

Fixes MSVC "error C4716: 'nasty_mutex::operator&': must return a value".

http://reviews.llvm.org/D19700

Files:
  test/support/nasty_containers.hpp

Index: test/support/nasty_containers.hpp
===================================================================
--- test/support/nasty_containers.hpp
+++ test/support/nasty_containers.hpp
@@ -287,7 +287,7 @@
      nasty_mutex() _NOEXCEPT {}
      ~nasty_mutex() {}
 
-	nasty_mutex *operator& ()   { assert(false); }
+	nasty_mutex *operator& ()   { assert(false); return nullptr; }
 	template <typename T>
 	void operator, (const T &) { assert(false); }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19700.55510.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160429/75f7f44f/attachment.bin>


More information about the cfe-commits mailing list