Skip to content

Commit eb53a48

Browse files
authored
Merge pull request #147 from steve-downey/LWG4072-constrain-compare
LWG4072. std::optional comparisons: constrain harder See https://cplusplus.github.io/LWG/issue4072
2 parents 139db62 + b679c7b commit eb53a48

File tree

3 files changed

+92
-82
lines changed

3 files changed

+92
-82
lines changed

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ SpaceBeforeCpp11BracedList: false
196196
SpaceBeforeCtorInitializerColon: true
197197
SpaceBeforeInheritanceColon: true
198198
SpaceBeforeJsonColon: false
199-
SpaceBeforeParens: ControlStatements
199+
SpaceBeforeParens: Custom
200200
SpaceBeforeParensOptions:
201201
AfterControlStatements: true
202202
AfterForeachMacros: true
203203
AfterFunctionDefinitionName: false
204204
AfterFunctionDeclarationName: false
205205
AfterIfMacros: true
206206
AfterOverloadedOperator: false
207-
AfterRequiresInClause: false
207+
AfterRequiresInClause: true
208208
AfterRequiresInExpression: false
209209
BeforeNonEmptyParentheses: false
210210
SpaceBeforeRangeBasedForLoopColon: true

include/beman/optional/detail/stl_interfaces/iterator_interface.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,15 +435,15 @@ BEMAN_OPTIONAL_DETAIL_STL_INTERFACES_NAMESPACE_V2 {
435435
};
436436

437437
template <typename Iterator>
438-
requires(
438+
requires (
439439
!requires { typename std::iterator_traits<Iterator>::iterator_concept; } &&
440440
requires { typename std::iterator_traits<Iterator>::iterator_category; })
441441
struct iter_concept<Iterator> {
442442
using type = typename std::iterator_traits<Iterator>::iterator_category;
443443
};
444444

445445
template <typename Iterator>
446-
requires(
446+
requires (
447447
!requires { typename std::iterator_traits<Iterator>::iterator_concept; } &&
448448
!requires { typename std::iterator_traits<Iterator>::iterator_category; })
449449
struct iter_concept<Iterator> {

0 commit comments

Comments
 (0)