Skip to content

Commit

Permalink
Change workaround for MSVC bug regarding compile-time initialization …
Browse files Browse the repository at this point in the history
…to trigger from MSC_VER 1910 to 1930.

1929 is the last _MSC_VER for Visual Studio 2019.

PiperOrigin-RevId: 449909831
Change-Id: Ibca931cc31131235eba55d2a1b97c7a062f059db
  • Loading branch information
Abseil Team authored and copybara-github committed May 20, 2022
1 parent b39a700 commit b8bbe92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion absl/time/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Duration {
constexpr Duration() : rep_hi_(0), rep_lo_(0) {} // zero-length duration

// Copyable.
#if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1910
#if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1930
// Explicitly defining the constexpr copy constructor avoids an MSVC bug.
constexpr Duration(const Duration& d)
: rep_hi_(d.rep_hi_), rep_lo_(d.rep_lo_) {}
Expand Down

0 comments on commit b8bbe92

Please sign in to comment.