Skip to content

Commit 1f57eb6

Browse files
committed
fix clang
Signed-off-by: Santiago Figueroa Manrique <[email protected]>
1 parent 4643c4a commit 1f57eb6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/cpp_unit_tests/test_main_model_type.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ struct AComponent {
1818
};
1919
} // namespace
2020

21+
template <typename T>
22+
concept Constructible = requires { T{}; };
23+
2124
static_assert(detail::validate_component_types_c<AllComponents>);
2225

2326
static_assert(detail::validate_component_types_c<ComponentList<Node, Source>>);
@@ -28,9 +31,10 @@ static_assert(detail::validate_component_types_c<ComponentList<Source, Node>>);
2831
static_assert(!detail::validate_component_types_c<ComponentList<Line>>);
2932
static_assert(!detail::validate_component_types_c<ComponentList<Source, Line>>);
3033

31-
static_assert(!std::constructible_from<MainModelType<ExtraRetrievableTypes<Base, Branch>, ComponentList<Line>>>);
32-
static_assert(!std::constructible_from<
33-
MainModelType<ExtraRetrievableTypes<Base, Branch, Appliance>, ComponentList<Line, Source>>>);
34+
static_assert(!Constructible<MainModelType<ExtraRetrievableTypes<Base, Branch>, ComponentList<Line>>>);
35+
static_assert(
36+
!Constructible<MainModelType<ExtraRetrievableTypes<Base, Branch, Appliance>, ComponentList<Line, Source>>>);
37+
static_assert(Constructible<MainModelType<ExtraRetrievableTypes<Base, Branch>, ComponentList<Node, Line>>>);
3438

3539
TEST_CASE("MainModelType") {
3640

0 commit comments

Comments
 (0)