Naios / continuable

C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)
https://naios.github.io/continuable/
MIT License
815 stars 44 forks source link

error: array used as initializer #67

Closed Spongman closed 1 year ago

Spongman commented 1 year ago

this isn't an issue in the continuable lib, it's a GCC bug in 11.2->12.1. i'm just putting this here so hopefully someone else doesn't waste the same 3 hours I wasted on it.

https://godbolt.org/z/5xqs1P716

struct OC
{
    std::vector<int> resources;
};

cti::continuable<> FF(OC content);

cti::continuable<> G()
{
    co_await FF(
        OC{
            .resources = {7}
        }
    );
}
<source>: In function 'cti::continuable<> G()':
<source>:20:1: error: array used as initializer
   20 | }
      | ^