Skip to content

Commit

Permalink
Support For Incomplete Types In reference_wrapper (microsoft#393)
Browse files Browse the repository at this point in the history
* Implement P0357R3
* Update LLVM to get skip of libcxx\test\std\utilities\function.objects\refwrap\weak_result.pass.cpp, and exclude "// REQUIRES: c++98 || c++03 || c++11 || c++14 || c++17" as a 'magic comment'.

Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
  • Loading branch information
3 people committed Jan 9, 2020
1 parent 31bed7a commit d862650
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llvm-project
Submodule llvm-project updated 4817 files
6 changes: 5 additions & 1 deletion stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,11 @@ template <class _Ty, class _Uty>
struct _Refwrap_has_ctor_from<_Ty, _Uty, void_t<decltype(_Refwrap_ctor_fun<_Ty>(_STD declval<_Uty>()))>> : true_type {};

template <class _Ty>
class reference_wrapper : public _Weak_types<_Ty>::type { // stand-in for an assignable reference
class reference_wrapper
#if !_HAS_CXX20
: public _Weak_types<_Ty>::type
#endif // !_HAS_CXX20
{
public:
static_assert(is_object_v<_Ty> || is_function_v<_Ty>,
"reference_wrapper<T> requires T to be an object type or a function type.");
Expand Down
1 change: 1 addition & 0 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
// P0318R1 unwrap_reference, unwrap_ref_decay
// P0325R4 to_array()
// P0356R5 bind_front()
// P0357R3 Supporting Incomplete Types In reference_wrapper
// P0439R0 enum class memory_order
// P0457R2 starts_with()/ends_with() For basic_string/basic_string_view
// P0458R2 contains() For Ordered And Unordered Associative Containers
Expand Down
1 change: 1 addition & 0 deletions tests/libcxx/magic_comments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// REQUIRES: c++11 || c++14
// REQUIRES: c++98 || c++03
// REQUIRES: c++98 || c++03 || c++11 || c++14
// REQUIRES: c++98 || c++03 || c++11 || c++14 || c++17
// UNSUPPORTED: c++14, c++17, c++2a

0 comments on commit d862650

Please sign in to comment.