Skip to content

Commit

Permalink
Update "Not to spec" tags for applied changes:
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Dec 27, 2017
1 parent ac8a7e6 commit 6255363
Show file tree
Hide file tree
Showing 26 changed files with 13 additions and 173 deletions.
2 changes: 0 additions & 2 deletions include/stl2/detail/concepts/callable.hpp
Expand Up @@ -94,8 +94,6 @@ STL2_OPEN_NAMESPACE {
template <class>
struct indirect_result_of {};

// Not to spec:
// and https://github.com/ericniebler/stl2/issues/286
template <class F, class... Is>
requires
Invocable<F, reference_t<Is>...>
Expand Down
1 change: 0 additions & 1 deletion include/stl2/detail/concepts/compare.hpp
Expand Up @@ -25,7 +25,6 @@
STL2_OPEN_NAMESPACE {
///////////////////////////////////////////////////////////////////////////
// Boolean [concepts.lib.compare.boolean]
// Not to spec: see https://github.com/ericniebler/stl2/issues/155
//
template <class B>
concept bool Boolean =
Expand Down
5 changes: 1 addition & 4 deletions include/stl2/detail/concepts/core.hpp
Expand Up @@ -71,7 +71,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// DerivedFrom [concepts.lib.corelang.derived]
// Not to spec: https://github.com/ericniebler/stl2/issues/255
//
template <class T, class U>
concept bool DerivedFrom =
#if defined(__GNUC__)
Expand All @@ -90,9 +90,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// ConvertibleTo [concepts.lib.corelang.convertibleto]
// Not to spec: Requires both implicit and explicit conversion with
// equal results.
// See https://github.com/ericniebler/stl2/issues/167
//
template <class T, class U>
concept bool ConvertibleTo =
Expand Down
2 changes: 0 additions & 2 deletions include/stl2/detail/concepts/object/assignable.hpp
Expand Up @@ -22,8 +22,6 @@ STL2_OPEN_NAMESPACE {
///////////////////////////////////////////////////////////////////////////
// Assignable [concepts.lib.corelang.assignable]
//
// Not to spec
// See https://github.com/ericniebler/stl2/issues/229
template <class T, class U>
concept bool Assignable =
_Is<T, is_lvalue_reference> &&
Expand Down
2 changes: 0 additions & 2 deletions include/stl2/detail/concepts/object/movable.hpp
Expand Up @@ -22,8 +22,6 @@ STL2_OPEN_NAMESPACE {
///////////////////////////////////////////////////////////////////////////
// Movable [concepts.lib.object.movable]
//
// Not to spec
// https://github.com/ericniebler/stl2/issues/310
template <class T>
concept bool Movable =
ext::Object<T> &&
Expand Down
12 changes: 4 additions & 8 deletions include/stl2/detail/concepts/object/move_constructible.hpp
Expand Up @@ -61,8 +61,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// Destructible [concepts.lib.object.destructible]
// Not to spec
// https://github.com/ericniebler/stl2/issues/301
//
template <class T>
concept bool Destructible =
_Is<T, is_nothrow_destructible> && __addressable<T>;
Expand All @@ -76,8 +75,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// Constructible [concepts.lib.object.constructible]
// Not to spec
// See https://github.com/ericniebler/stl2/issues/301
//
template <class T, class... Args>
concept bool Constructible =
Destructible<T> && _Is<T, is_constructible, Args...>;
Expand All @@ -91,8 +89,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// DefaultConstructible [concepts.lib.object.defaultconstructible]
// Not to spec
// https://github.com/ericniebler/stl2/issues/301
//
template <class T>
concept bool DefaultConstructible =
Constructible<T>;
Expand All @@ -106,8 +103,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// MoveConstructible [concepts.lib.object.moveconstructible]
// Not to spec
// https://github.com/ericniebler/stl2/issues/313
//
template <class T>
concept bool MoveConstructible =
Constructible<T, T> && ConvertibleTo<T, T>;
Expand Down
4 changes: 1 addition & 3 deletions include/stl2/detail/concepts/object/semiregular.hpp
Expand Up @@ -23,9 +23,7 @@
STL2_OPEN_NAMESPACE {
///////////////////////////////////////////////////////////////////////////
// CopyConstructible [concepts.lib.object.copyconstructible]
// Not to spec
// https://github.com/ericniebler/stl2/issues/301
// https://github.com/ericniebler/stl2/issues/313
//
template <class T>
concept bool CopyConstructible =
MoveConstructible<T> &&
Expand Down
9 changes: 1 addition & 8 deletions include/stl2/detail/iterator/common_iterator.hpp
Expand Up @@ -172,20 +172,16 @@ STL2_OPEN_NAMESPACE {
public:
using difference_type = difference_type_t<I>;

// Not to spec: constexpr per P0579
constexpr common_iterator() = default;

// Not to spec: constexpr per P0579
constexpr common_iterator(I i)
noexcept(is_nothrow_constructible<variant<I, S>, I>::value)
: v_{std::move(i)} {}

// Not to spec: constexpr per P0579
constexpr common_iterator(S s)
noexcept(is_nothrow_constructible<variant<I, S>, S>::value)
: v_{std::move(s)} {}

// Not to spec: constexpr per P0579
template <ConvertibleTo<I> II, ConvertibleTo<S> SS>
constexpr common_iterator(const common_iterator<II, SS>& i)
noexcept(
Expand Down Expand Up @@ -229,8 +225,7 @@ STL2_OPEN_NAMESPACE {
++__stl2::get_unchecked<I>(v_);
return *this;
}
// Not to spec:
// https://github.com/ericniebler/stl2/issues/232

decltype(auto) operator++(int)
noexcept(noexcept((decltype(declval<I&>()++))declval<I&>()++)) {
STL2_EXPECT(__stl2::holds_alternative<I>(v_));
Expand All @@ -245,8 +240,6 @@ STL2_OPEN_NAMESPACE {
return tmp;
}

// Not to spec:
// https://github.com/ericniebler/stl2/issues/245
friend rvalue_reference_t<I> iter_move(
const common_iterator& i)
noexcept(noexcept(__stl2::iter_move(std::declval<const I&>())))
Expand Down
21 changes: 2 additions & 19 deletions include/stl2/detail/iterator/concepts.hpp
Expand Up @@ -53,9 +53,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// iter_move
// Not to spec: Uses a two-step dispatch instead of requiring user overloads
// to compete with the default overloads in overload resolution.
// See https://github.com/ericniebler/stl2/issues/242
//
namespace __iter_move {
// Not a poison pill, simply a non-ADL block.
Expand Down Expand Up @@ -108,8 +105,7 @@ STL2_OPEN_NAMESPACE {
///////////////////////////////////////////////////////////////////////////
// value_type [readable.iterators]
// Not to spec:
// * Implements #299
// * Implements #423
// * Implements https://github.com/ericniebler/stl2/issues/423
//
namespace detail {
template <class T>
Expand Down Expand Up @@ -170,9 +166,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// Readable [readable.iterators]
// Not to spec: Disables the "Experimental additional tests"
// See https://github.com/ericniebler/stl2/issues/239
// Additional changes from P0547
//
template <class I>
concept bool Readable =
Expand Down Expand Up @@ -201,9 +194,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// Writable [iterators.writable]
// Not to spec, but getting closer.
// See https://github.com/ericniebler/stl2/issues/339
// and https://github.com/ericniebler/stl2/issues/381
//
template <class Out, class R>
concept bool Writable =
Expand Down Expand Up @@ -310,8 +300,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// iter_swap
// Not to spec
// See https://github.com/ericniebler/stl2/issues/242
//
namespace __iter_swap {
// Poison pill for iter_swap. (See the detailed discussion at
Expand Down Expand Up @@ -382,8 +370,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// IndirectlySwappable [commonalgoreq.indirectlyswappable]
// Not to spec
// See https://github.com/ericniebler/stl2/issues/241
//

template <class I1, class I2 = I1>
Expand Down Expand Up @@ -566,8 +552,7 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// OutputIterator [iterators.output]
// Not to spec:
// adds requirement on *i++ from P0541.
//
template <class I, class T>
concept bool OutputIterator =
Iterator<I> &&
Expand All @@ -585,8 +570,6 @@ STL2_OPEN_NAMESPACE {

///////////////////////////////////////////////////////////////////////////
// InputIterator [iterators.input]
// Not to spec: No requirements on i++
// See http://github.com/ericniebler/stl2/issues/232
//
template <class I>
concept bool InputIterator =
Expand Down
9 changes: 0 additions & 9 deletions include/stl2/detail/iterator/counted_iterator.hpp
Expand Up @@ -23,7 +23,6 @@
#include <stl2/detail/iterator/operations.hpp>

STL2_OPEN_NAMESPACE {
// Not to spec: All members constexpr per P0579
Iterator{I}
class counted_iterator {
Iterator{O} friend class counted_iterator;
Expand Down Expand Up @@ -76,8 +75,6 @@ STL2_OPEN_NAMESPACE {
--cnt();
return *this;
}
// Not to spec:
// https://github.com/ericniebler/stl2/issues/232
constexpr decltype(auto) operator++(int) {
STL2_EXPECT(cnt() > 0);
--cnt();
Expand Down Expand Up @@ -129,8 +126,6 @@ STL2_OPEN_NAMESPACE {
return current()[n];
}

// Not to spec
// https://github.com/ericniebler/stl2/issues/245
friend constexpr rvalue_reference_t<I>
iter_move(const counted_iterator& i)
noexcept(noexcept(__stl2::iter_move(i.current())))
Expand All @@ -154,7 +149,6 @@ STL2_OPEN_NAMESPACE {
using type = iterator_category_t<I>;
};

// Not to spec: All operators constexpr per P0579
template <class I1, class I2>
requires Common<I1, I2>
constexpr bool operator==(
Expand Down Expand Up @@ -230,14 +224,12 @@ STL2_OPEN_NAMESPACE {
return x + n;
}

// Not to spec: constexpr per P0579
template <Iterator I>
constexpr auto make_counted_iterator(I i, difference_type_t<I> n)
STL2_NOEXCEPT_RETURN(
counted_iterator<I>{std::move(i), n}
)

// Not to spec: constexpr per P0579
Iterator{I}
constexpr void advance(counted_iterator<I>& i, difference_type_t<I> n)
noexcept(noexcept(__stl2::advance(std::declval<I&>(), n)))
Expand All @@ -247,7 +239,6 @@ STL2_OPEN_NAMESPACE {
i.cnt() -= n;
}

// Not to spec: constexpr per P0579
RandomAccessIterator{I}
constexpr void advance(counted_iterator<I>& i, difference_type_t<I> n)
STL2_NOEXCEPT_RETURN(
Expand Down
2 changes: 0 additions & 2 deletions include/stl2/detail/iterator/increment.hpp
Expand Up @@ -27,8 +27,6 @@ STL2_OPEN_NAMESPACE {
// * Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78173; it is
// necessary to guard the requires clause of the "fallback" specialization
// to prevent hard errors for pointers to incomplete types.
// * Omit the extraneous is_array specialization.
// See https://github.com/ericniebler/stl2/issues/243
//
namespace detail {
template <class T>
Expand Down
2 changes: 0 additions & 2 deletions include/stl2/detail/iterator/insert_iterators.hpp
Expand Up @@ -153,8 +153,6 @@ STL2_OPEN_NAMESPACE {
insert_iterator& operator++() {
return *this;
}
// Not to spec:
// https://github.com/ericniebler/stl2/issues/232
insert_iterator& operator++(int) {
return *this;
}
Expand Down
3 changes: 1 addition & 2 deletions include/stl2/detail/iterator/istreambuf_iterator.hpp
Expand Up @@ -31,8 +31,7 @@ STL2_OPEN_NAMESPACE {
}

// Not to spec:
// * requirements are implicit.
// See https://github.com/ericniebler/stl2/issues/246)
// * Implements https://github.com/ericniebler/stl2/issues/246
//
template <class charT, class traits = std::char_traits<charT>>
requires
Expand Down

0 comments on commit 6255363

Please sign in to comment.