@@ -71,7 +71,7 @@ Convention::Convention(const string& id, Type type) : type_(type), id_(id) {}
7171
7272const boost::shared_ptr<ore::data::Conventions>& InstrumentConventions::conventions (QuantLib::Date d) const {
7373 QL_REQUIRE (!conventions_.empty (), " InstrumentConventions: No conventions provided." );
74- std ::shared_lock<std ::shared_mutex> lock (mutex_);
74+ boost ::shared_lock<boost ::shared_mutex> lock (mutex_);
7575 Date dt = d == Date () ? Settings::instance ().evaluationDate () : d;
7676 auto it = conventions_.lower_bound (dt);
7777 if (it != conventions_.end () && it->first == dt)
@@ -91,7 +91,7 @@ const boost::shared_ptr<ore::data::Conventions>& InstrumentConventions::conventi
9191
9292void InstrumentConventions::setConventions (
9393 const boost::shared_ptr<ore::data::Conventions>& conventions, QuantLib::Date d) {
94- std ::unique_lock<std ::shared_mutex> lock (mutex_);
94+ boost ::unique_lock<boost ::shared_mutex> lock (mutex_);
9595 conventions_[d] = conventions;
9696}
9797
@@ -2467,7 +2467,7 @@ void Conventions::fromXML(XMLNode* node) {
24672467}
24682468
24692469XMLNode* Conventions::toXML (XMLDocument& doc) {
2470- std ::unique_lock<std ::shared_mutex> lock (mutex_);
2470+ boost ::unique_lock<boost ::shared_mutex> lock (mutex_);
24712471
24722472 XMLNode* conventionsNode = doc.allocNode (" Conventions" );
24732473
@@ -2480,7 +2480,7 @@ XMLNode* Conventions::toXML(XMLDocument& doc) {
24802480}
24812481
24822482void Conventions::clear () const {
2483- std ::unique_lock<std ::shared_mutex> lock (mutex_);
2483+ boost ::unique_lock<boost ::shared_mutex> lock (mutex_);
24842484 data_.clear ();
24852485}
24862486
@@ -2509,7 +2509,7 @@ std::string flip(const std::string& id, const std::string& sep = "-") {
25092509boost::shared_ptr<Convention> Conventions::get (const string& id) const {
25102510
25112511 {
2512- std ::shared_lock<std ::shared_mutex> lock (mutex_);
2512+ boost ::shared_lock<boost ::shared_mutex> lock (mutex_);
25132513 if (auto it = data_.find (id); it != data_.end ()) {
25142514 used_.insert (id);
25152515 return it->second ;
@@ -2522,7 +2522,7 @@ boost::shared_ptr<Convention> Conventions::get(const string& id) const {
25222522
25232523 std::string type, unparsed;
25242524 {
2525- std ::unique_lock<std ::shared_mutex> lock (mutex_);
2525+ boost ::unique_lock<boost ::shared_mutex> lock (mutex_);
25262526 if (auto it = unparsed_.find (id); it != unparsed_.end ()) {
25272527 std::tie (type, unparsed) = it->second ;
25282528 unparsed_.erase (id);
@@ -2597,7 +2597,7 @@ boost::shared_ptr<Convention> Conventions::get(const string& id) const {
25972597}
25982598
25992599boost::shared_ptr<Convention> Conventions::getFxConvention (const string& ccy1, const string& ccy2) const {
2600- std ::shared_lock<std ::shared_mutex> lock (mutex_);
2600+ boost ::shared_lock<boost ::shared_mutex> lock (mutex_);
26012601 for (auto c : data_) {
26022602 auto fxCon = boost::dynamic_pointer_cast<FXConvention>(c.second );
26032603 if (fxCon) {
@@ -2629,7 +2629,7 @@ std::set<boost::shared_ptr<Convention>> Conventions::get(const Convention::Type&
26292629 std::set<std::string> unparsedIds;
26302630 std::string typeStr = ore::data::to_string (type);
26312631 {
2632- std ::shared_lock<std ::shared_mutex> lock (mutex_);
2632+ boost ::shared_lock<boost ::shared_mutex> lock (mutex_);
26332633 for (auto const & d : data_) {
26342634 if (d.second ->type () == type) {
26352635 used_.insert (d.first );
@@ -2653,7 +2653,7 @@ bool Conventions::has(const string& id) const {
26532653 } catch (const std::exception& e) {
26542654 return false ;
26552655 }
2656- std ::shared_lock<std ::shared_mutex> lock (mutex_);
2656+ boost ::shared_lock<boost ::shared_mutex> lock (mutex_);
26572657 return data_.find (id) != data_.end () || unparsed_.find (id) != unparsed_.end () ||
26582658 data_.find (flip (id)) != data_.end () || unparsed_.find (flip (id)) != unparsed_.end ();
26592659}
@@ -2663,7 +2663,7 @@ bool Conventions::has(const std::string& id, const Convention::Type& type) const
26632663}
26642664
26652665void Conventions::add (const boost::shared_ptr<Convention>& convention) const {
2666- std ::unique_lock<std ::shared_mutex> lock (mutex_);
2666+ boost ::unique_lock<boost ::shared_mutex> lock (mutex_);
26672667 const string& id = convention->id ();
26682668 QL_REQUIRE (data_.find (id) == data_.end (), " Convention already exists for id " << id);
26692669 data_[id] = convention;
0 commit comments