Boost logo

Boost :

Subject: [boost] Is this a MSVC bug?
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-05-06 07:45:41

While tracking test failures in Boost.Optional library I discovered that
the following program fires an assert in MS VC++ compiler (v. 10.0, 11.0,

#include <cassert>

const int global_i = 0;

struct TestingReferenceBinding
  void operator=(const int& ii)
    assert(&ii == &global_i);

  void operator=(int&&) { }

int main()
  TestingReferenceBinding ttt;
  ttt = global_i;

Do you know if this a bug in VC++, or if that is supposed to be valid?


Boost list run by bdawes at, gregod at, cpdaniel at, john at