martinmoene / expected-dark

Expected objects for C++11 and later (and later perhaps C++98 )
MIT License
52 stars 4 forks source link

Update expected-lite to proposal p0323r6 (was 5) #20

Open martinmoene opened 6 years ago

martinmoene commented 6 years ago

Update expected-lite to proposal ~p0323r5~ p0323r6. Provide (some) backward compatibility through CMake variable EXPECTED_P0323R.

See also issues:

Plan:

  1. unexpected[_type]<E>:

    • [x] constructors
    • [x] destructor (not specified)
    • [x] assignment
    • [x] swap
    • [x] observers
    • [x] relational operators: deprecate less-than comparable (provide for EXPECTED_P0323R<= 2)
    • [x] remove default template parameter std::exception_ptr (provide for EXPECTED_P0323R<= 2)
    • [x] remove unexpected[_type]<std::exception_ptr> specialisation (provide for EXPECTED_P0323R<= 2)
    • [x] alias unexpected_type&ltE> to unexpected<E> for C++17, however not for MSVC <= 14.1 due to clash with unexpected()
  2. unexpect tag:

    • [x] struct unexpect_t
    • [x] object unexpect (now inline for C++17)
    • [x] in_place_unexpected_t kept as alias of unexpect_t
    • [x] object in_place_unexpected kept (now inline for C++17)
  3. bad_expected_access:

    • [x] bad_expected_access<T>
    • [x] bad_expected_access<void>
  4. expected<T,E>:

    • [x] constructors
    • [x] destructor
    • [ ] assignment
    • [ ] swap
    • [ ] observers
    • [ ] relational operators: deprecate less-than comparable (provide for EXPECTED_P0323R<= 2)
    • [ ] comparison with T: deprecate less-than comparable (provide for EXPECTED_P0323R<= 2)
    • [ ] comparison with unexpected[_type]<E>: deprecate less-than comparable (provide for EXPECTED_P0323R<= 2)
    • [ ] specialised algorithms
    • [x] remove default template parameter std::exception_ptr (provide for EXPECTED_P0323R<= 2)
  5. Traits:

    • [x] is_unexpected<> (not in propsal; provide for EXPECTED_P0323R <= 3)
    • [ ] error_traits<E> (not in propsal; provide for EXPECTED_P0323R <= 3)
    • [x] expected_traits<T,E> (not present in expected-lite; removed from proposal in r4)
  6. Factory functions

    • [ ] make_expected, deprecate, not useful with two template argument to specify
    • [ ] make_unexpected, keep
  7. Test specification

    • [ ] Test for all values of nsel_P0323R
    • [ ] Identify missing tests
    • [ ] Add missing tests
  8. Update documentation

    • [ ] Readme