File tree Expand file tree Collapse file tree
tests/0026.container/0001.vector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ struct Node2
1212{
1313 fast_io::vector<Base> subast;
1414
15- Node2 ();
16- Node2 (fast_io::vector<Base> sub);
17- ~Node2 ();
15+ constexpr Node2 ();
16+ constexpr Node2 (fast_io::vector<Base> sub);
17+ constexpr ~Node2 ();
18+
19+ template <typename >
20+ constexpr int a_method (int ) const noexcept ;
1821};
1922
2023struct Base
@@ -30,10 +33,16 @@ struct Base
3033 {}
3134};
3235
33- Node2::Node2 () = default;
34- Node2::Node2 (fast_io::vector<Base> sub) : subast(std::move(sub))
36+ constexpr Node2::Node2 () = default;
37+ constexpr Node2::Node2 (fast_io::vector<Base> sub) : subast(std::move(sub))
3538{}
36- Node2::~Node2 () = default ;
39+ constexpr Node2::~Node2 () = default ;
40+
41+ template <typename >
42+ constexpr int Node2::a_method (int ) const noexcept
43+ {
44+ return 42 ;
45+ }
3746
3847using Ast = fast_io::vector<Base>;
3948
@@ -58,6 +67,11 @@ int main()
5867 }
5968 else if constexpr (std::is_same_v<T, Node2>)
6069 {
70+ int const v{n.template a_method <int >(0 )};
71+ if (v != 42 )
72+ {
73+ ::fast_io::fast_terminate ();
74+ }
6175 }
6276 else if constexpr (std::is_same_v<T, Node3>)
6377 {
You can’t perform that action at this time.
0 commit comments