Unable to use std::chrono clocks via Cxx interop #72737
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
c++ interop
Feature: Interoperability with C++
c++ to swift
Feature → c++ interop: c++ to swift
compiler
The Swift compiler itself
swift 5.10
unexpected error
Bug: Unexpected error
Description
Compiler complains that the result of
.now()
is ambiguous without a type annotation. It shouldn't be ambiguous, and I was unable to find any incantation which would satisfy the compiler.Reproduction
(Build with
-cxx-interoperability-mode=default
)Even with a type annotation:
It knows what the underlying type of
steady_clock.time_point
is, though:Expected behavior
Expect it to work, even without a type annotation.
Environment
Swift version 5.10-dev (LLVM 5dc9d563e5a6cd2, Swift 9bfe759)
Target: x86_64-unknown-linux-gnu
Additional information
Godbolt
The text was updated successfully, but these errors were encountered: