Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Apr 1, 2024
1 parent cf44b0e commit 05627bd
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions testing_utilities/check_well_formedness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,26 @@
#define PRINCIPIA_CONCATENATE_EXPANSION(s1, s2) PRINCIPIA_CONCATENATE(s1, s2)

#define PRINCIPIA_CHECK_WELL_FORMEDNESS(unique_concept_name, \
expected_well_formedness, \
expected_well_formedness_description, \
expression, \
...) \
template<template<typename> typename WITH = std::type_identity_t> \
concept unique_concept_name = \
requires(__VA_ARGS__) { \
(expression); \
}; \
static_assert(expected_well_formedness unique_concept_name<>, \
"Expected\n " #expression \
expected_well_formedness, \
expected_well_formedness_description, \
expression, \
...) \
template<template<typename> typename WITH = std::type_identity_t> \
concept unique_concept_name = requires(__VA_ARGS__) { (expression); }; \
static_assert(expected_well_formedness unique_concept_name<>, \
"Expected\n " #expression \
"\n" expected_well_formedness_description)
#define PRINCIPIA_CHECK_ILL_FORMED(expression, ...) \
PRINCIPIA_CHECK_WELL_FORMEDNESS( \
PRINCIPIA_CONCATENATE_EXPANSION(test_concept_, __COUNTER__), \
!, \
"not to compile", \
expression, \
#define PRINCIPIA_CHECK_ILL_FORMED(expression, ...) \
PRINCIPIA_CHECK_WELL_FORMEDNESS( \
PRINCIPIA_CONCATENATE_EXPANSION(test_concept_, __COUNTER__), \
!, \
"not to compile", \
expression, \
__VA_ARGS__)
#define PRINCIPIA_CHECK_WELL_FORMED(expression, ...) \
#define PRINCIPIA_CHECK_WELL_FORMED(expression, ...) \
PRINCIPIA_CHECK_WELL_FORMEDNESS( \
PRINCIPIA_CONCATENATE_EXPANSION(test_concept_, __COUNTER__), \
, \
"to compile", \
expression, \
PRINCIPIA_CONCATENATE_EXPANSION(test_concept_, __COUNTER__), \
, \
"to compile", \
expression, \
__VA_ARGS__)

0 comments on commit 05627bd

Please sign in to comment.