From b45a3b7cdd34abcc0d3c97db6e8a0d393286400a Mon Sep 17 00:00:00 2001 From: Conrad Poelman Date: Sat, 25 Jan 2020 16:07:29 -0500 Subject: [PATCH] MSVC "assignment within conditional" warning fix The latest MSVC 2019 issues a warning on this line. This change performs the assignment prior to the conditional. --- include/boost/intrusive/bstree_algorithms.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/intrusive/bstree_algorithms.hpp b/include/boost/intrusive/bstree_algorithms.hpp index 9088911..3eea0b4 100644 --- a/include/boost/intrusive/bstree_algorithms.hpp +++ b/include/boost/intrusive/bstree_algorithms.hpp @@ -1014,7 +1014,8 @@ class bstree_algorithms : public bstree_algorithms_base while(x){ ++depth; y = x; - x = (left_child = comp(key, x)) ? + left_child = comp(key, x); + x = left_child ? NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x)); }