diff --git a/.github/workflows/build-cppfront.yaml b/.github/workflows/build-cppfront.yaml index be4f9045f..80995485e 100644 --- a/.github/workflows/build-cppfront.yaml +++ b/.github/workflows/build-cppfront.yaml @@ -19,17 +19,15 @@ concurrency: cancel-in-progress: true jobs: - # Comment out the Windows build until it is fixed - # build-windows: - # runs-on: windows-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: ilammy/msvc-dev-cmd@v1 - # - name: Compiler name & version - # run: cl.exe - # - name: Build - # run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX - + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: ilammy/msvc-dev-cmd@v1 + - name: Compiler name & version + run: cl.exe + - name: Build + run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX build-unix-like: strategy: fail-fast: false diff --git a/.github/workflows/regression-tests.yaml b/.github/workflows/regression-tests.yaml index 45a114854..879da3641 100644 --- a/.github/workflows/regression-tests.yaml +++ b/.github/workflows/regression-tests.yaml @@ -59,50 +59,43 @@ jobs: compiler: clang++ cxx_std: c++2b stdlib: default - # Comment out Windows tests until build on Windows is fixed - # - os: windows-2025 - # shortosname: win-25 - # compiler: cl.exe - # cxx_std: c++latest - # stdlib: default - # - os: windows-2025 - # shortosname: win-25 - # compiler: cl.exe - # cxx_std: c++20 - # stdlib: default + - os: windows-2025 + shortosname: win-25 + compiler: cl.exe + cxx_std: c++latest + stdlib: default + vs_version: '18' # VS 2026 + - os: windows-2025 + shortosname: win-25 + compiler: cl.exe + cxx_std: c++20 + stdlib: default + vs_version: '18' # VS 2026 steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v7 - - name: Prepare compilers - macOS - if: matrix.os == 'macos-13' + - name: Prepare compiler - Clang 19 + if: matrix.os == 'ubuntu-24.04' && startsWith(matrix.compiler, 'clang') run: | - sudo xcode-select --switch /Applications/Xcode_14.3.1.app - sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15 + sudo apt-get install -y clang-19 - - name: Prepare compilers - Ubuntu 24.04 - if: matrix.os == 'ubuntu-24.04' - run: | - sudo sudo apt-get install clang-19 + - name: Set up MSVC - Windows + if: startsWith(matrix.os, 'windows') + uses: ilammy/msvc-dev-cmd@v1 + with: + vsversion: ${{ matrix.vs_version }} - - name: Run regression tests - Linux and macOS version - if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') + - name: Run regression tests + shell: bash run: | + git config --local core.autocrlf false cd regression-tests bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }} - - name: Run regression tests - Windows version - if: startsWith(matrix.os, 'windows') - run: | - "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && ^ - git config --local core.autocrlf false && ^ - cd regression-tests && ^ - bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }} - shell: cmd - - name: Upload patch if: success() || failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch path: regression-tests/${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch @@ -114,7 +107,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download all patches - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: downloaded-results @@ -129,7 +122,7 @@ jobs: - name: Upload aggregated results if: steps.prepare_files.outputs.patch_count != '0' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: aggregated-results path: aggregated-results diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index d64ed3949..f2973d898 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -143,7 +143,8 @@ exclude_test_filter="" if [[ "$cxx_compiler" == *"cl.exe"* ]]; then compiler_cmd="cl.exe -nologo -std:${cxx_std} -MD -EHsc -I ..\..\..\include -Fe:" exec_out_dir="$expected_results_dir/msvc-2022-${cxx_std}" - compiler_version=$(cl.exe) + # cl.exe prints its version banner to stderr + compiler_version=$(cl.exe 2>&1 >/dev/null) else # Verify the compiler command which "$cxx_compiler" > /dev/null diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-autodiff-taylor.cpp.output b/regression-tests/test-results/msvc-2022-c++20/mixed-autodiff-taylor.cpp.output new file mode 100644 index 000000000..b190afc5c --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/mixed-autodiff-taylor.cpp.output @@ -0,0 +1,8 @@ +mixed-autodiff-taylor.cpp +cpp2taylor.h2(7): error C2079: 'cpp2::taylor::v' uses undefined class 'std::array' + with + [ + R=double + ] +cpp2taylor.h2(7): note: the template instantiation context (the oldest one first) is +mixed-autodiff-taylor.cpp2(6): note: see reference to class template instantiation 'cpp2::taylor' being compiled diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output b/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output index 5ca28db9b..4377c4e6e 100644 --- a/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/mixed-parameter-passing.cpp.output @@ -6,3 +6,6 @@ mixed-parameter-passing.cpp2(44): error C2079: 'container::buf' uses undefi ] mixed-parameter-passing.cpp2(44): note: the template instantiation context (the oldest one first) is mixed-parameter-passing.cpp2(54): note: see reference to class template instantiation 'container' being compiled +mixed-parameter-passing.cpp2(44): error C2439: 'container::buf': member could not be initialized +mixed-parameter-passing.cpp2(44): note: see declaration of 'container::buf' +mixed-parameter-passing.cpp2(54): note: see reference to function 'container::container(void)' diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output index 625c578d5..cf103822e 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output @@ -1,22 +1,20 @@ pure2-assert-expected-not-null.cpp pure2-assert-expected-not-null.cpp2(7): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(7): error C2062: type 'int' unexpected pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '{' pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier -pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +pure2-assert-expected-not-null.cpp2(9): error C2100: you cannot dereference an operand of type '' pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '{' pure2-assert-expected-not-null.cpp2(14): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2660: 'unexpected': function does not take 1 arguments -C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\eh.h(33): note: see declaration of 'unexpected' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\eh.h(33): note: see declaration of 'unexpected' pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argument list '(bool)' pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier -pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +pure2-assert-expected-not-null.cpp2(15): error C2100: you cannot dereference an operand of type '' diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.execution new file mode 100644 index 000000000..84a5f58de --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.execution @@ -0,0 +1,240 @@ +diff(x + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y + x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 7.000000 + d1 = 4.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -1.000000 + d1 = -1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x - y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -3.000000 + d1 = -2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + y - x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 6.000000 + d1 = 7.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * y * x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 12.000000 + d1 = 20.000000 + d2 = 22.000000 + d3 = 12.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.666667 + d1 = -0.111111 + d2 = 0.148148 + d3 = -0.296296 + d4 = 0.790123 + d5 = -2.633745 + d6 = 10.534979 +diff(x / y / y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 0.222222 + d1 = -0.185185 + d2 = 0.296296 + d3 = -0.691358 + d4 = 2.106996 + d5 = -7.901235 + d6 = 35.116598 +diff(x * y / x) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 3.000000 + d1 = 2.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * (x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x + x * y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 8.000000 + d2 = 4.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(+x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(-x + y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 1.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 10.000000 + d1 = 11.000000 + d2 = 6.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(sin(x - y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = -0.841471 + d1 = -0.540302 + d2 = 0.841471 + d3 = 0.540302 + d4 = -0.841471 + d5 = -0.540302 + d6 = 0.841471 +diff(if branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(if else branch) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 2.000000 + d1 = 1.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(direct return) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate passive var) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate untyped) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate default init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(intermediate no init) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(do while loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 8.000000 + d1 = 5.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(for loop) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(tye_outer.a + y) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 +diff(type_outer.add(y)) at (x = 2.000000, x_d = ( 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ), y = 3.000000, y_d = ( 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 )): + r = 5.000000 + d1 = 3.000000 + d2 = 0.000000 + d3 = 0.000000 + d4 = 0.000000 + d5 = 0.000000 + d6 = 0.000000 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.output new file mode 100644 index 000000000..1455f82b9 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff-higher-order.cpp.output @@ -0,0 +1 @@ +pure2-autodiff-higher-order.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.execution new file mode 100644 index 000000000..863bd6bd5 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.execution @@ -0,0 +1,46 @@ +diff(x + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y + x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 7.000000, r_d = 4.000000) +diff(x - y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -1.000000, r_d = -1.000000) +diff(x - y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -3.000000, r_d = -2.000000) +diff(x + y - x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 6.000000, r_d = 7.000000) +diff(x * y * x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 12.000000, r_d = 20.000000) +diff(x / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.666667, r_d = -0.111111) +diff(x / y / y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 0.222222, r_d = -0.185185) +diff(x * y / x) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 3.000000, r_d = 2.000000) +diff(x * (x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x + x * y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 8.000000) +diff(+x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(-x + y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 1.000000, r_d = 1.000000) +diff(x * func(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(x * func_outer(x, y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 10.000000, r_d = 11.000000) +diff(sin(x - y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = -0.841471, r_d = -0.540302) +diff(if branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(if else branch) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 2.000000, r_d = 1.000000) +diff(direct return) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate passive var) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate untyped) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate default init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(intermediate no init) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(do while loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 8.000000, r_d = 5.000000) +diff(for loop) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(tye_outer.a + y) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(type_outer.add(y)) at (x = 2.000000, x_d = 1.000000, y = 3.000000, y_d = 2.000000) = (r = 5.000000, r_d = 3.000000) +diff(x + y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 5.000000, x_b = 1.000000, y_b = 1.000000) +diff(x + y + x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 7.000000, x_b = 2.000000, y_b = 1.000000) +diff(x - y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -1.000000, x_b = 1.000000, y_b = -1.000000) +diff(x - y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -3.000000, x_b = 0.000000, y_b = -1.000000) +diff(x + y - x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 6.000000, x_b = 3.000000, y_b = 2.000000) +diff(x * y * x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 12.000000, x_b = 12.000000, y_b = 4.000000) +diff(x / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.666667, x_b = 0.333333, y_b = -0.222222) +diff(x / y / y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 0.222222, x_b = 0.111111, y_b = -0.148148) +diff(x * y / x) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 3.000000, x_b = 0.000000, y_b = 1.000000) +diff(x * (x + y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x + x * y) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 8.000000, x_b = 4.000000, y_b = 2.000000) +diff(sin(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = -0.841471, x_b = 0.540302, y_b = -0.540302) +diff(x * func(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +diff(x * func_outer(x-y)) at (x = 2.000000, y = 3.000000, r_b = 1.000000) = (r = 10.000000, x_b = 7.000000, y_b = 2.000000) +2nd order diff of x*x at 2.000000 = 2.000000 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.output new file mode 100644 index 000000000..32eadc310 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-autodiff.cpp.output @@ -0,0 +1 @@ +pure2-autodiff.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output index a31340a04..a30f6e63c 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-expected-is-as.cpp.output @@ -1,21 +1,21 @@ pure2-expected-is-as.cpp pure2-expected-is-as.cpp2(7): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(7): error C2062: type 'int' unexpected pure2-expected-is-as.cpp2(7): error C2143: syntax error: missing ';' before '{' pure2-expected-is-as.cpp2(7): error C2143: syntax error: missing ';' before '}' pure2-expected-is-as.cpp2(8): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(8): error C2062: type 'int' unexpected pure2-expected-is-as.cpp2(8): error C2143: syntax error: missing ';' before '{' pure2-expected-is-as.cpp2(8): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(8): error C2660: 'unexpected': function does not take 1 arguments -C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\eh.h(33): note: see declaration of 'unexpected' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\eh.h(33): note: see declaration of 'unexpected' pure2-expected-is-as.cpp2(8): note: while trying to match the argument list '(int)' pure2-expected-is-as.cpp2(8): error C2143: syntax error: missing ';' before '}' pure2-expected-is-as.cpp2(9): error C2039: 'expected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(9): error C2275: 'std::string': expected an expression instead of a type pure2-expected-is-as.cpp2(9): error C2065: 'ex3': undeclared identifier pure2-expected-is-as.cpp2(9): error C2275: 'size_t': expected an expression instead of a type @@ -23,34 +23,147 @@ pure2-expected-is-as.cpp2(11): error C2065: 'ex1': undeclared identifier pure2-expected-is-as.cpp2(15): error C2065: 'ex1': undeclared identifier pure2-expected-is-as.cpp2(20): error C2065: 'ex1': undeclared identifier pure2-expected-is-as.cpp2(25): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(25): error C2062: type 'int' unexpected pure2-expected-is-as.cpp2(25): error C2059: syntax error: '>' pure2-expected-is-as.cpp2(25): error C2143: syntax error: missing ';' before '{' pure2-expected-is-as.cpp2(30): error C2065: 'ex1': undeclared identifier pure2-expected-is-as.cpp2(34): error C2065: 'ex1': undeclared identifier pure2-expected-is-as.cpp2(39): error C2065: 'ex1': undeclared identifier -pure2-expected-is-as.cpp2(39): error C2119: 'val1': the type for 'auto' cannot be deduced from an empty initializer +pure2-expected-is-as.cpp2(40): error C2593: 'operator <<' is ambiguous +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(476): note: could be 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_streambuf> *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(444): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(const void *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(426): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(408): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(390): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(float)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(372): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned __int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(354): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(__int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(336): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(318): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(299): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(273): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(254): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(220): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(202): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(bool)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(196): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::ios_base &(__cdecl *)(std::ios_base &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(190): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ios> &(__cdecl *)(std::basic_ios> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(185): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ostream> &(__cdecl *)(std::basic_ostream> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(471): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::nullptr_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(684): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(728): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(764): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(809): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(926): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const signed char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(932): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,signed char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(937): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const unsigned char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(943): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,unsigned char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(951): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char8_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(957): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char8_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(965): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,wchar_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(968): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const wchar_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(972): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char16_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(974): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char32_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(982): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char16_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(984): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char32_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(1027): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const std::error_code &)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\thread(298): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,std::thread::id)' +pure2-expected-is-as.cpp2(40): note: while trying to match the argument list '(std::basic_ostream>, )' pure2-expected-is-as.cpp2(42): error C2065: 'ex2': undeclared identifier pure2-expected-is-as.cpp2(47): error C2065: 'ex2': undeclared identifier pure2-expected-is-as.cpp2(52): error C2065: 'ex2': undeclared identifier pure2-expected-is-as.cpp2(57): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(57): error C2062: type 'int' unexpected pure2-expected-is-as.cpp2(57): error C2059: syntax error: '>' pure2-expected-is-as.cpp2(57): error C2143: syntax error: missing ';' before '{' pure2-expected-is-as.cpp2(58): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(58): error C2593: 'operator <<' is ambiguous +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(476): note: could be 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_streambuf> *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(444): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(const void *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(426): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(408): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(390): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(float)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(372): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned __int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(354): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(__int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(336): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(318): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(299): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(273): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(254): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(220): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(202): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(bool)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(196): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::ios_base &(__cdecl *)(std::ios_base &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(190): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ios> &(__cdecl *)(std::basic_ios> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(185): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ostream> &(__cdecl *)(std::basic_ostream> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(471): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::nullptr_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(684): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(728): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(764): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(809): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(926): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const signed char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(932): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,signed char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(937): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const unsigned char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(943): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,unsigned char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(951): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char8_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(957): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char8_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(965): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,wchar_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(968): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const wchar_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(972): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char16_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(974): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char32_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(982): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char16_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(984): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char32_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(1027): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const std::error_code &)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\thread(298): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,std::thread::id)' +pure2-expected-is-as.cpp2(58): note: while trying to match the argument list '(std::basic_ostream>, )' pure2-expected-is-as.cpp2(61): error C2065: 'ex2': undeclared identifier pure2-expected-is-as.cpp2(62): error C2065: 'ex2': undeclared identifier +pure2-expected-is-as.cpp2(62): error C2593: 'operator <<' is ambiguous +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(476): note: could be 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_streambuf> *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(444): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(const void *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(426): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(408): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(double)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(390): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(float)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(372): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned __int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(354): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(__int64)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(336): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(318): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(299): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(273): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(int)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(254): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(220): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(short)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(202): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(bool)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(196): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::ios_base &(__cdecl *)(std::ios_base &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(190): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ios> &(__cdecl *)(std::basic_ios> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(185): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ostream> &(__cdecl *)(std::basic_ostream> &))' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(471): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::nullptr_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(684): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(728): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(764): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(809): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(926): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const signed char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(932): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,signed char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(937): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const unsigned char *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(943): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,unsigned char)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(951): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char8_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(957): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char8_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(965): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,wchar_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(968): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const wchar_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(972): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char16_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(974): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,char32_t)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(982): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char16_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(984): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const char32_t *)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\__msvc_ostream.hpp(1027): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,const std::error_code &)' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\thread(298): note: or 'std::basic_ostream> &std::operator <<>(std::basic_ostream> &,std::thread::id)' +pure2-expected-is-as.cpp2(62): note: while trying to match the argument list '(std::basic_ostream>, )' pure2-expected-is-as.cpp2(65): error C2039: 'unexpected': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-expected-is-as.cpp2(65): error C2062: type 'int' unexpected -pure2-expected-is-as.cpp2(65): error C2062: type 'unknown-type' unexpected +pure2-expected-is-as.cpp2(65): error C2062: type '' unexpected pure2-expected-is-as.cpp2(65): error C2143: syntax error: missing ';' before '}' pure2-expected-is-as.cpp2(66): error C2143: syntax error: missing ';' before '<<' pure2-expected-is-as.cpp2(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int pure2-expected-is-as.cpp2(66): error C2371: 'std::cout': redefinition; different basic types -C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\iostream(40): note: see declaration of 'std::cout' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\iostream(40): note: see declaration of 'std::cout' pure2-expected-is-as.cpp2(66): error C2059: syntax error: '<<' pure2-expected-is-as.cpp2(66): error C2143: syntax error: missing ';' before '{' pure2-expected-is-as.cpp2(66): error C2447: '{': missing function header (old-style formal list?) diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.execution new file mode 100644 index 000000000..d2076f3f7 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.execution @@ -0,0 +1 @@ +calling generated function ns::add_1... ns::add_1(42) returned 43 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.output new file mode 100644 index 000000000..3cecf4b73 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-function-body-reflection.cpp.output @@ -0,0 +1 @@ +pure2-function-body-reflection.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output index 68eb47f77..6fd9fa7ea 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-last-use.cpp.output @@ -1,27 +1,27 @@ pure2-last-use.cpp pure2-last-use.cpp2(274): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(274): error C7568: argument list missing after assumed function template 'move_only_function' -pure2-last-use.cpp2(274): error C2062: type 'unknown-type' unexpected +pure2-last-use.cpp2(274): error C2062: type '' unexpected pure2-last-use.cpp2(274): error C2238: unexpected token(s) preceding ';' pure2-last-use.cpp2(275): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(275): error C7568: argument list missing after assumed function template 'move_only_function' -pure2-last-use.cpp2(275): error C2062: type 'unknown-type' unexpected +pure2-last-use.cpp2(275): error C2062: type '' unexpected pure2-last-use.cpp2(275): error C2238: unexpected token(s) preceding ';' pure2-last-use.cpp2(277): error C2760: syntax error: '>' was unexpected here; expected 'expression' pure2-last-use.cpp2(277): error C2760: syntax error: '>' was unexpected here; expected ';' pure2-last-use.cpp2(277): error C2059: syntax error: '>' pure2-last-use.cpp2(344): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(344): error C7568: argument list missing after assumed function template 'move_only_function' -pure2-last-use.cpp2(344): error C2062: type 'unknown-type' unexpected +pure2-last-use.cpp2(344): error C2062: type '' unexpected pure2-last-use.cpp2(344): error C2238: unexpected token(s) preceding ';' pure2-last-use.cpp2(348): error C2760: syntax error: '>' was unexpected here; expected 'expression' pure2-last-use.cpp2(348): error C2760: syntax error: '>' was unexpected here; expected ';' pure2-last-use.cpp2(348): error C2059: syntax error: '>' pure2-last-use.cpp2(773): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(773): error C2061: syntax error: identifier 'move_only_function' pure2-last-use.cpp2(279): error C2760: syntax error: '>' was unexpected here; expected 'expression' pure2-last-use.cpp2(278): error C2244: 'issue_857_4::{ctor}': unable to match function definition to an existing declaration @@ -37,7 +37,7 @@ pure2-last-use.cpp2(279): error C2059: syntax error: '>' pure2-last-use.cpp2(279): error C2065: 'mg_': undeclared identifier pure2-last-use.cpp2(279): error C3553: decltype expects an expression not a type pure2-last-use.cpp2(279): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(279): error C2143: syntax error: missing ')' before 'attribute specifier' pure2-last-use.cpp2(279): error C2065: 'move_only_function': undeclared identifier pure2-last-use.cpp2(279): error C2059: syntax error: 'attribute specifier' @@ -85,26 +85,23 @@ pure2-last-use.cpp2(352): error C2059: syntax error: '{' pure2-last-use.cpp2(352): error C2143: syntax error: missing ';' before '{' pure2-last-use.cpp2(352): error C2447: '{': missing function header (old-style formal list?) pure2-last-use.cpp2(773): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(773): error C2061: syntax error: identifier 'move_only_function' pure2-last-use.cpp2(774): error C3861: 'size': identifier not found -pure2-last-use.cpp2(774): note: This diagnostic occurred in the compiler generated function 'decltype(auto) issue_888_1::::operator ()(Obj &&,Params ...) noexcept() const' pure2-last-use.cpp2(774): error C2065: 'size': undeclared identifier -pure2-last-use.cpp2(774): note: This diagnostic occurred in the compiler generated function 'decltype(auto) issue_888_1::::operator ()(Obj &&,Params ...) noexcept() const' -pure2-last-use.cpp2(774): error C2338: static_assert failed: 'this function call syntax tries 'obj.func(...)', then 'func(obj,...);', but both failed - if this function call is passing a local variable that will be modified by the function, but that variable is never used again in the function so the new value is never used, that's likely the problem - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object' +pure2-last-use.cpp2(774): error C2057: expected constant expression +pure2-last-use.cpp2(774): error C2338: static assertion failed: 'this function call syntax tries 'obj.func(...)', then 'func(obj,...);', but both failed - if this function call is passing a local variable that will be modified by the function, but that variable is never used again in the function so the new value is never used, that's likely the problem - if that's what you intended, add another line '_ = obj;' afterward to explicitly discard the new value of the object' pure2-last-use.cpp2(774): note: the template instantiation context (the oldest one first) is -pure2-last-use.cpp2(774): note: see reference to function template instantiation 'decltype(auto) issue_888_1::::operator ()(Obj &&) noexcept(false) const' being compiled +pure2-last-use.cpp2(774): note: see reference to function template instantiation 'decltype(auto) issue_888_1::::operator ()(Obj &&) const' being compiled with [ Obj=int ] +pure2-last-use.cpp2(774): warning C4353: nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead pure2-last-use.cpp2(790): error C2039: 'move_only_function': is not a member of 'std' -predefined C++ types (compiler internal)(357): note: see declaration of 'std' +C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std' pure2-last-use.cpp2(790): error C2143: syntax error: missing ')' before 'attribute specifier' pure2-last-use.cpp2(790): error C2065: 'move_only_function': undeclared identifier pure2-last-use.cpp2(790): error C2143: syntax error: missing ';' before 'attribute specifier' pure2-last-use.cpp2(790): error C2059: syntax error: ')' -pure2-last-use.cpp2(790): error C2734: 'unnamed_param_1': 'const' object must be initialized if not 'extern' -pure2-last-use.cpp2(790): error C2143: syntax error: missing ';' before '>' -pure2-last-use.cpp2(790): error C2059: syntax error: '>' pure2-last-use.cpp2(790): fatal error C1003: error count exceeds 100; stopping compilation diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.execution new file mode 100644 index 000000000..cd61d4f56 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.execution @@ -0,0 +1,58 @@ +Running tests_20_lookbehind: +01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b +02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b +03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results - +04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results - +05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results - +06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results - +07_y: OK regex: (?)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo +50_n: OK regex: (?)foo parsed_regex: (?)foo str: bar>foo result_expr: - expected_results - +51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo +52_n: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: - expected_results - +53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd +54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy +55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy +56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.output new file mode 100644 index 000000000..14196f2d8 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_20_lookbehind.cpp.output @@ -0,0 +1 @@ +pure2-regex_20_lookbehind.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.execution new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.execution @@ -0,0 +1 @@ +42 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.output new file mode 100644 index 000000000..d9a75d655 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-singleton-and-static.cpp.output @@ -0,0 +1 @@ +pure2-singleton-and-static.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.execution new file mode 100644 index 000000000..c37cb6b5f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.execution @@ -0,0 +1,2 @@ +oh look, a thrown int: 42 +oh look, another exception diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.output new file mode 100644 index 000000000..75d9a670f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-try-catch.cpp.output @@ -0,0 +1 @@ +pure2-try-catch.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution index 541b2a0d9..371e06b05 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution @@ -4,5 +4,4 @@ ctor - from string construct [ Henry | 123 Ford Dr. ] ctor - from string assign [ Clara | 123 Ford Dr. ] ctor - copy (GENERAL) cp-construct [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] ctor - move mv-construct [ Clara(CM) | 123 Ford Dr. ] <- [ | ] -ctor - copy (GENERAL) cp-assign [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ] assign - move mv-assign [ Clara | 123 Ford Dr. ] <- [ | ] diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output index 634011b23..f1128b42d 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-default-arguments.cpp.output @@ -1,2 +1 @@ pure2-default-arguments.cpp -pure2-default-arguments.cpp2(6): error C7595: 'std::source_location::current': call to immediate function is not a constant expression