Skip to content

Commit fa7f60c

Browse files
committed
1 parent 4077bf2 commit fa7f60c

File tree

22 files changed

+82
-82
lines changed

22 files changed

+82
-82
lines changed

src/kernel/declaration.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class constant_val : public object_ref {
6363
public:
6464
constant_val(name const & n, names const & lparams, expr const & type);
6565
constant_val(constant_val const & other):object_ref(other) {}
66-
constant_val(constant_val && other):object_ref(std::move(other)) {}
66+
constant_val(constant_val && other) noexcept:object_ref(std::move(other)) {}
6767
constant_val & operator=(constant_val const & other) { object_ref::operator=(other); return *this; }
68-
constant_val & operator=(constant_val && other) { object_ref::operator=(std::move(other)); return *this; }
68+
constant_val & operator=(constant_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
6969
name const & get_name() const { return static_cast<name const &>(cnstr_get_ref(*this, 0)); }
7070
names const & get_lparams() const { return static_cast<names const &>(cnstr_get_ref(*this, 1)); }
7171
expr const & get_type() const { return static_cast<expr const &>(cnstr_get_ref(*this, 2)); }
@@ -79,9 +79,9 @@ class axiom_val : public object_ref {
7979
public:
8080
axiom_val(name const & n, names const & lparams, expr const & type, bool is_unsafe);
8181
axiom_val(axiom_val const & other):object_ref(other) {}
82-
axiom_val(axiom_val && other):object_ref(std::move(other)) {}
82+
axiom_val(axiom_val && other) noexcept:object_ref(std::move(other)) {}
8383
axiom_val & operator=(axiom_val const & other) { object_ref::operator=(other); return *this; }
84-
axiom_val & operator=(axiom_val && other) { object_ref::operator=(std::move(other)); return *this; }
84+
axiom_val & operator=(axiom_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
8585
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
8686
name const & get_name() const { return to_constant_val().get_name(); }
8787
names const & get_lparams() const { return to_constant_val().get_lparams(); }
@@ -105,9 +105,9 @@ class definition_val : public object_ref {
105105
public:
106106
definition_val(name const & n, names const & lparams, expr const & type, expr const & val, reducibility_hints const & hints, definition_safety safety, names const & all);
107107
definition_val(definition_val const & other):object_ref(other) {}
108-
definition_val(definition_val && other):object_ref(std::move(other)) {}
108+
definition_val(definition_val && other) noexcept:object_ref(std::move(other)) {}
109109
definition_val & operator=(definition_val const & other) { object_ref::operator=(other); return *this; }
110-
definition_val & operator=(definition_val && other) { object_ref::operator=(std::move(other)); return *this; }
110+
definition_val & operator=(definition_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
111111
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
112112
name const & get_name() const { return to_constant_val().get_name(); }
113113
names const & get_lparams() const { return to_constant_val().get_lparams(); }
@@ -128,9 +128,9 @@ class theorem_val : public object_ref {
128128
public:
129129
theorem_val(name const & n, names const & lparams, expr const & type, expr const & val, names const & all);
130130
theorem_val(theorem_val const & other):object_ref(other) {}
131-
theorem_val(theorem_val && other):object_ref(std::move(other)) {}
131+
theorem_val(theorem_val && other) noexcept:object_ref(std::move(other)) {}
132132
theorem_val & operator=(theorem_val const & other) { object_ref::operator=(other); return *this; }
133-
theorem_val & operator=(theorem_val && other) { object_ref::operator=(std::move(other)); return *this; }
133+
theorem_val & operator=(theorem_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
134134
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
135135
name const & get_name() const { return to_constant_val().get_name(); }
136136
names const & get_lparams() const { return to_constant_val().get_lparams(); }
@@ -148,9 +148,9 @@ class opaque_val : public object_ref {
148148
public:
149149
opaque_val(name const & n, names const & lparams, expr const & type, expr const & val, bool is_unsafe, names const & all);
150150
opaque_val(opaque_val const & other):object_ref(other) {}
151-
opaque_val(opaque_val && other):object_ref(std::move(other)) {}
151+
opaque_val(opaque_val && other) noexcept:object_ref(std::move(other)) {}
152152
opaque_val & operator=(opaque_val const & other) { object_ref::operator=(other); return *this; }
153-
opaque_val & operator=(opaque_val && other) { object_ref::operator=(std::move(other)); return *this; }
153+
opaque_val & operator=(opaque_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
154154
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
155155
name const & get_name() const { return to_constant_val().get_name(); }
156156
names const & get_lparams() const { return to_constant_val().get_lparams(); }
@@ -179,9 +179,9 @@ class inductive_type : public object_ref {
179179
public:
180180
inductive_type(name const & id, expr const & type, constructors const & cnstrs);
181181
inductive_type(inductive_type const & other):object_ref(other) {}
182-
inductive_type(inductive_type && other):object_ref(std::move(other)) {}
182+
inductive_type(inductive_type && other) noexcept:object_ref(std::move(other)) {}
183183
inductive_type & operator=(inductive_type const & other) { object_ref::operator=(other); return *this; }
184-
inductive_type & operator=(inductive_type && other) { object_ref::operator=(std::move(other)); return *this; }
184+
inductive_type & operator=(inductive_type && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
185185
name const & get_name() const { return static_cast<name const &>(cnstr_get_ref(*this, 0)); }
186186
expr const & get_type() const { return static_cast<expr const &>(cnstr_get_ref(*this, 1)); }
187187
constructors const & get_cnstrs() const { return static_cast<constructors const &>(cnstr_get_ref(*this, 2)); }
@@ -205,15 +205,15 @@ class declaration : public object_ref {
205205
public:
206206
declaration();
207207
declaration(declaration const & other):object_ref(other) {}
208-
declaration(declaration && other):object_ref(std::move(other)) {}
208+
declaration(declaration && other) noexcept:object_ref(std::move(other)) {}
209209
/* low-level constructors */
210210
explicit declaration(object * o):object_ref(o) {}
211211
explicit declaration(b_obj_arg o, bool b):object_ref(o, b) {}
212212
explicit declaration(object_ref const & o):object_ref(o) {}
213213
declaration_kind kind() const { return static_cast<declaration_kind>(obj_tag(raw())); }
214214

215215
declaration & operator=(declaration const & other) { object_ref::operator=(other); return *this; }
216-
declaration & operator=(declaration && other) { object_ref::operator=(std::move(other)); return *this; }
216+
declaration & operator=(declaration && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
217217

218218
friend bool is_eqp(declaration const & d1, declaration const & d2) { return d1.raw() == d2.raw(); }
219219

@@ -263,10 +263,10 @@ declaration mk_axiom_inferring_unsafe(environment const & env, name const & n,
263263
class inductive_decl : public object_ref {
264264
public:
265265
inductive_decl(inductive_decl const & other):object_ref(other) {}
266-
inductive_decl(inductive_decl && other):object_ref(std::move(other)) {}
266+
inductive_decl(inductive_decl && other) noexcept:object_ref(std::move(other)) {}
267267
inductive_decl(declaration const & d):object_ref(d) { lean_assert(d.is_inductive()); }
268268
inductive_decl & operator=(inductive_decl const & other) { object_ref::operator=(other); return *this; }
269-
inductive_decl & operator=(inductive_decl && other) { object_ref::operator=(std::move(other)); return *this; }
269+
inductive_decl & operator=(inductive_decl && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
270270
names const & get_lparams() const { return static_cast<names const &>(cnstr_get_ref(raw(), 0)); }
271271
nat const & get_nparams() const { return static_cast<nat const &>(cnstr_get_ref(raw(), 1)); }
272272
inductive_types const & get_types() const { return static_cast<inductive_types const &>(cnstr_get_ref(raw(), 2)); }
@@ -290,9 +290,9 @@ class inductive_val : public object_ref {
290290
inductive_val(name const & n, names const & lparams, expr const & type, unsigned nparams,
291291
unsigned nindices, names const & all, names const & cnstrs, unsigned nnested, bool is_rec, bool is_unsafe, bool is_reflexive);
292292
inductive_val(inductive_val const & other):object_ref(other) {}
293-
inductive_val(inductive_val && other):object_ref(std::move(other)) {}
293+
inductive_val(inductive_val && other) noexcept:object_ref(std::move(other)) {}
294294
inductive_val & operator=(inductive_val const & other) { object_ref::operator=(other); return *this; }
295-
inductive_val & operator=(inductive_val && other) { object_ref::operator=(std::move(other)); return *this; }
295+
inductive_val & operator=(inductive_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
296296
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
297297
unsigned get_nparams() const { return static_cast<nat const &>(cnstr_get_ref(*this, 1)).get_small_value(); }
298298
unsigned get_nindices() const { return static_cast<nat const &>(cnstr_get_ref(*this, 2)).get_small_value(); }
@@ -317,9 +317,9 @@ class constructor_val : public object_ref {
317317
public:
318318
constructor_val(name const & n, names const & lparams, expr const & type, name const & induct, unsigned cidx, unsigned nparams, unsigned nfields, bool is_unsafe);
319319
constructor_val(constructor_val const & other):object_ref(other) {}
320-
constructor_val(constructor_val && other):object_ref(std::move(other)) {}
320+
constructor_val(constructor_val && other) noexcept:object_ref(std::move(other)) {}
321321
constructor_val & operator=(constructor_val const & other) { object_ref::operator=(other); return *this; }
322-
constructor_val & operator=(constructor_val && other) { object_ref::operator=(std::move(other)); return *this; }
322+
constructor_val & operator=(constructor_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
323323
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
324324
name const & get_induct() const { return static_cast<name const &>(cnstr_get_ref(*this, 1)); }
325325
unsigned get_cidx() const { return static_cast<nat const &>(cnstr_get_ref(*this, 2)).get_small_value(); }
@@ -338,9 +338,9 @@ class recursor_rule : public object_ref {
338338
public:
339339
recursor_rule(name const & cnstr, unsigned nfields, expr const & rhs);
340340
recursor_rule(recursor_rule const & other):object_ref(other) {}
341-
recursor_rule(recursor_rule && other):object_ref(std::move(other)) {}
341+
recursor_rule(recursor_rule && other) noexcept:object_ref(std::move(other)) {}
342342
recursor_rule & operator=(recursor_rule const & other) { object_ref::operator=(other); return *this; }
343-
recursor_rule & operator=(recursor_rule && other) { object_ref::operator=(std::move(other)); return *this; }
343+
recursor_rule & operator=(recursor_rule && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
344344
name const & get_cnstr() const { return static_cast<name const &>(cnstr_get_ref(*this, 0)); }
345345
unsigned get_nfields() const { return static_cast<nat const &>(cnstr_get_ref(*this, 1)).get_small_value(); }
346346
expr const & get_rhs() const { return static_cast<expr const &>(cnstr_get_ref(*this, 2)); }
@@ -365,9 +365,9 @@ class recursor_val : public object_ref {
365365
names const & all, unsigned nparams, unsigned nindices, unsigned nmotives,
366366
unsigned nminors, recursor_rules const & rules, bool k, bool is_unsafe);
367367
recursor_val(recursor_val const & other):object_ref(other) {}
368-
recursor_val(recursor_val && other):object_ref(std::move(other)) {}
368+
recursor_val(recursor_val && other) noexcept:object_ref(std::move(other)) {}
369369
recursor_val & operator=(recursor_val const & other) { object_ref::operator=(other); return *this; }
370-
recursor_val & operator=(recursor_val && other) { object_ref::operator=(std::move(other)); return *this; }
370+
recursor_val & operator=(recursor_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
371371
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
372372
name const & get_name() const { return to_constant_val().get_name(); }
373373
name const & get_major_induct() const;
@@ -398,9 +398,9 @@ class quot_val : public object_ref {
398398
public:
399399
quot_val(name const & n, names const & lparams, expr const & type, quot_kind k);
400400
quot_val(quot_val const & other):object_ref(other) {}
401-
quot_val(quot_val && other):object_ref(std::move(other)) {}
401+
quot_val(quot_val && other) noexcept:object_ref(std::move(other)) {}
402402
quot_val & operator=(quot_val const & other) { object_ref::operator=(other); return *this; }
403-
quot_val & operator=(quot_val && other) { object_ref::operator=(std::move(other)); return *this; }
403+
quot_val & operator=(quot_val && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
404404
constant_val const & to_constant_val() const { return static_cast<constant_val const &>(cnstr_get_ref(*this, 0)); }
405405
name const & get_name() const { return to_constant_val().get_name(); }
406406
names const & get_lparams() const { return to_constant_val().get_lparams(); }
@@ -434,14 +434,14 @@ class constant_info : public object_ref {
434434
constant_info(constructor_val const & v);
435435
constant_info(recursor_val const & v);
436436
constant_info(constant_info const & other):object_ref(other) {}
437-
constant_info(constant_info && other):object_ref(std::move(other)) {}
437+
constant_info(constant_info && other) noexcept:object_ref(std::move(other)) {}
438438
explicit constant_info(b_obj_arg o, bool b):object_ref(o, b) {}
439439
explicit constant_info(obj_arg o):object_ref(o) {}
440440

441441
constant_info_kind kind() const { return static_cast<constant_info_kind>(cnstr_tag(raw())); }
442442

443443
constant_info & operator=(constant_info const & other) { object_ref::operator=(other); return *this; }
444-
constant_info & operator=(constant_info && other) { object_ref::operator=(std::move(other)); return *this; }
444+
constant_info & operator=(constant_info && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
445445

446446
friend bool is_eqp(constant_info const & d1, constant_info const & d2) { return d1.raw() == d2.raw(); }
447447

src/kernel/environment.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace lean {
2929
class diagnostics : public object_ref {
3030
public:
3131
diagnostics(diagnostics const & other):object_ref(other) {}
32-
diagnostics(diagnostics && other):object_ref(std::move(other)) {}
32+
diagnostics(diagnostics && other) noexcept:object_ref(std::move(other)) {}
3333
explicit diagnostics(b_obj_arg o, bool b):object_ref(o, b) {}
3434
explicit diagnostics(obj_arg o):object_ref(o) {}
3535
~diagnostics() {}
@@ -74,13 +74,13 @@ class LEAN_EXPORT environment : public object_ref {
7474
environment add_inductive(declaration const & d) const;
7575
public:
7676
environment(environment const & other):object_ref(other) {}
77-
environment(environment && other):object_ref(std::move(other)) {}
77+
environment(environment && other) noexcept:object_ref(std::move(other)) {}
7878
explicit environment(b_obj_arg o, bool b):object_ref(o, b) {}
7979
explicit environment(obj_arg o):object_ref(o) {}
8080
~environment() {}
8181

8282
environment & operator=(environment const & other) { object_ref::operator=(other); return *this; }
83-
environment & operator=(environment && other) { object_ref::operator=(std::move(other)); return *this; }
83+
environment & operator=(environment && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
8484

8585
diagnostics get_diag() const;
8686
environment set_diag(diagnostics const & diag) const;

src/kernel/expr.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ class literal : public object_ref {
5050
explicit literal(nat const & v);
5151
literal():literal(0u) {}
5252
literal(literal const & other):object_ref(other) {}
53-
literal(literal && other):object_ref(std::move(other)) {}
53+
literal(literal && other) noexcept:object_ref(std::move(other)) {}
5454
literal & operator=(literal const & other) { object_ref::operator=(other); return *this; }
55-
literal & operator=(literal && other) { object_ref::operator=(std::move(other)); return *this; }
55+
literal & operator=(literal && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
5656

5757
static literal_kind kind(object * o) { return static_cast<literal_kind>(cnstr_tag(o)); }
5858
literal_kind kind() const { return kind(raw()); }
@@ -83,7 +83,7 @@ inductive Expr
8383
*/
8484
enum class expr_kind { BVar, FVar, MVar, Sort, Const, App, Lambda, Pi, Let, Lit, MData, Proj };
8585
class expr : public object_ref {
86-
explicit expr(object_ref && o):object_ref(o) {}
86+
explicit expr(object_ref && o) noexcept:object_ref(o) {}
8787

8888
friend expr mk_lit(literal const & lit);
8989
friend expr mk_mdata(kvmap const & d, expr const & e);
@@ -100,14 +100,14 @@ class expr : public object_ref {
100100
public:
101101
expr();
102102
expr(expr const & other):object_ref(other) {}
103-
expr(expr && other):object_ref(std::move(other)) {}
103+
expr(expr && other) noexcept:object_ref(std::move(other)) {}
104104
explicit expr(b_obj_arg o, bool b):object_ref(o, b) {}
105105
explicit expr(obj_arg o):object_ref(o) {}
106106
static expr_kind kind(object * o) { return static_cast<expr_kind>(cnstr_tag(o)); }
107107
expr_kind kind() const { return kind(raw()); }
108108

109109
expr & operator=(expr const & other) { object_ref::operator=(other); return *this; }
110-
expr & operator=(expr && other) { object_ref::operator=(std::move(other)); return *this; }
110+
expr & operator=(expr && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
111111

112112
friend bool is_eqp(expr const & e1, expr const & e2) { return e1.raw() == e2.raw(); }
113113
};

src/kernel/level.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ class level : public object_ref {
3636
friend level mk_imax_core(level const & l1, level const & l2);
3737
friend level mk_univ_param(name const & n);
3838
friend level mk_univ_mvar(name const & n);
39-
explicit level(object_ref && o):object_ref(o) {}
39+
explicit level(object_ref && o) noexcept:object_ref(o) {}
4040
public:
4141
/** \brief Universe zero */
4242
level();
4343
explicit level(obj_arg o):object_ref(o) {}
4444
explicit level(b_obj_arg o, bool b):object_ref(o, b) {}
4545
level(level const & other):object_ref(other) {}
46-
level(level && other):object_ref(std::move(other)) {}
46+
level(level && other) noexcept:object_ref(std::move(other)) {}
4747
level_kind kind() const {
4848
return lean_is_scalar(raw()) ? level_kind::Zero : static_cast<level_kind>(lean_ptr_tag(raw()));
4949
}
5050
unsigned hash() const;
5151

5252
level & operator=(level const & other) { object_ref::operator=(other); return *this; }
53-
level & operator=(level && other) { object_ref::operator=(std::move(other)); return *this; }
53+
level & operator=(level && other) noexcept { object_ref::operator=(std::move(other)); return *this; }
5454

5555
friend bool is_eqp(level const & l1, level const & l2) { return l1.raw() == l2.raw(); }
5656

0 commit comments

Comments
 (0)