Skip to content

On the ABI compatibility of std::future #5260

Description

@PiliLatiesa

The following program:

#include <future>
#include <iostream>

void Fn() {}

int main()
{
  std::future<void> Future;
  
  Future = std::async(std::launch::async, Fn);
  
  Future.get();
  
  std::cin.get();
  
  return 0;
}

compiled with:

cl Source.cpp /EHsc /O2 /MD
Compilador de optimización de C/C++ de Microsoft (R) versión 19.42.34436 para x86
(C) Microsoft Corporation. Todos los derechos reservados.

Source.cpp
Microsoft (R) Incremental Linker Version 14.42.34436.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:Source.exe
Source.obj

crashes when executed on a computer with the MSVC redistributable version 14.29.30135 installed.

Isn't this combination supposed to work?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis issue is incorrect or by design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions