Menu

Compiler error C3646 _noexcept with Visual Studio 2019

OTL
2022-02-28
2022-03-04
  • Juergen Stiebert

    Hello * ,

    We are using otlv4.h version 4.0.360 for many years in C++ applications on Windows 10 and AIX with Visual Studio 2015.
    Moving forward now to Vs 2019 I get a compilation warning:
    warning STL4006: std::uncaught_exception() is deprecated in C++17

    and a compilation error:
    error C3646: "_NOEXCEPT": Unbekannter šberschreibungsspezifizierer

    from the header. Is anybody facing the same issues and is there a workaround/solution available ?
    I did myself some investigation and found the following section in otlv4.h:

    "#define OTL_ANSI_CPP_11_NOEXCEPT _NOEXCEPT" (line 108 in this version of the header).

    Thanks for any information
    Juergen

     
  • Juergen Stiebert

    screenshot added

     
  • Sergei Kuchin

    Sergei Kuchin - 2022-02-28

    Juergen,

    Did you try the latest OTL 4.0.469? OTL 4.0.360 is out of date.

    Sergei

     
  • Juergen Stiebert

    Hello Sergei, yes, I did. The compilation with the newest otlv4.h works fine in VS2019 without this issue. The problem here is, that the new version differs completely from my old one, so I would have to run excessive testing of all applications using it (we have >10.000 users/day) to avoid any regression. This is possible, but not planned or budgeted currently.
    Doing test I have seen, that the error can be workarounded simply replacing the line:
    define OTL_ANSI_CPP_11_NOEXCEPT NOEXCEPT
    with
    define OTLANSICPP11NOEXCEPT throw()

    Any comment on this ?

    Best regards
    Juergen

     
  • Sergei Kuchin

    Sergei Kuchin - 2022-03-04

    Juergen,

    If it works for you, why not? No actual DB APIs calls are different. I'd run some tests, because my philosophy is that when you change even a comma in the code, you need to re-run your test suites.

    Sergei

     

Log in to post a comment.