Replace incorrect assertion in AtomicWord with is_always_lock_free from TODO C++17

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding 2021-10-18
    • 29
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Static assertion that AtomicWord is integral is backwards. In this code:

      MONGO_STATIC_ASSERT(!std::is_integral<T>::value ||                         
              sizeof(T) == sizeof(atomic_word_detail::Base<T>));
      

      should be `std::is_integral<T>::value`. Fortunately everything still compiles with that fix, at least on Intel.

      However, instead I'm removing this assertion all together and replacing with TODO from a while back to implement `std::atomic<WordType>::is_always_lock_free` assertion.

            Assignee:
            Andrew Shuvalov (Inactive)
            Reporter:
            Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: