1. Matt Oswald
  2. xUnit++
Issue #10 resolved

Assert.Throws + std::exception compile error

Anonymous created an issue
FACT("test")
{
    Assert.Throws<std::exception>([]() {});
}

causes a compile error: error C2312: 'const std::exception &' : is caught by 'const std::exception &' on line 585 c:\dev\xunit\xunit++\xunit++\xUnitAssert.h 589 1

Whereas if I change the caught exception type to any other derived type, it compiles fine.

Microsoft Visual Studio Ultimate 2012 Version 11.0.51106.01 Update 1 xUnit++ v1.3.1 (can't choose it in the dropdown)

Comments (3)

  1. Log in to comment