Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    a9e472c6
    libstdc++: Implement LWG 3886 for std::optional and std::expected · a9e472c6
    Jonathan Wakely authored
    This uses remove_cv_t<T> for the default template argument used for
    deducing a type for a braced-init-list used with std::optional and
    std::expected.
    
    libstdc++-v3/ChangeLog:
    
    	* include/std/expected (expected(U&&), operator=(U&&))
    	(value_or): Use remove_cv_t on default template argument, as per
    	LWG 3886.
    	* include/std/optional (optional(U&&), operator=(U&&))
    	(value_or): Likewise.
    	* testsuite/20_util/expected/lwg3886.cc: New test.
    	* testsuite/20_util/optional/cons/lwg3886.cc: New test.
    libstdc++: Implement LWG 3886 for std::optional and std::expected
    Jonathan Wakely authored
    This uses remove_cv_t<T> for the default template argument used for
    deducing a type for a braced-init-list used with std::optional and
    std::expected.
    
    libstdc++-v3/ChangeLog:
    
    	* include/std/expected (expected(U&&), operator=(U&&))
    	(value_or): Use remove_cv_t on default template argument, as per
    	LWG 3886.
    	* include/std/optional (optional(U&&), operator=(U&&))
    	(value_or): Likewise.
    	* testsuite/20_util/expected/lwg3886.cc: New test.
    	* testsuite/20_util/optional/cons/lwg3886.cc: New test.