Changes in src/ResolvExpr/ResolvMode.h [396037d:1389810]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ResolvMode.h
r396037d r1389810 22 22 const bool prune; ///< Prune alternatives to min-cost per return type? [true] 23 23 const bool failFast; ///< Fail on no resulting alternatives? [true] 24 const bool satisfyAssns; ///< Satisfy assertions? [false]25 24 26 25 private: 27 constexpr ResolvMode(bool a, bool p, bool ff , bool sa)28 : adjust(a), prune(p), failFast(ff) , satisfyAssns(sa){}26 constexpr ResolvMode(bool a, bool p, bool ff) 27 : adjust(a), prune(p), failFast(ff) {} 29 28 30 29 public: 31 30 /// Default settings 32 constexpr ResolvMode() : adjust(false), prune(true), failFast(true) , satisfyAssns(false){}31 constexpr ResolvMode() : adjust(false), prune(true), failFast(true) {} 33 32 34 33 /// With adjust flag set; turns array and function types into equivalent pointers 35 static constexpr ResolvMode withAdjustment() { return { true, true, true , false}; }34 static constexpr ResolvMode withAdjustment() { return { true, true, true }; } 36 35 37 36 /// With adjust flag set but prune unset; pruning ensures there is at least one alternative 38 37 /// per result type 39 static constexpr ResolvMode withoutPrune() { return { true, false, true , false}; }38 static constexpr ResolvMode withoutPrune() { return { true, false, true }; } 40 39 41 40 /// With adjust and prune flags set but failFast unset; failFast ensures there is at least 42 41 /// one resulting alternative 43 static constexpr ResolvMode withoutFailFast() { return { true, true, false , false}; }42 static constexpr ResolvMode withoutFailFast() { return { true, true, false }; } 44 43 45 44 /// The same mode, but with satisfyAssns turned on; for top-level calls 46 ResolvMode atTopLevel() const { return { adjust, prune, failFast, true}; }45 ResolvMode atTopLevel() const { return { adjust, true, failFast }; } 47 46 }; 48 47 } // namespace ResolvExpr
Note: See TracChangeset
for help on using the changeset viewer.