c++11 - Inheriting constexpr variadic constructor in MSVC -


the following code rejected msvc 15.4.0 preview 1 (vs 2017), accepted gcc 7.1.0.

struct b {     template<typename... ts>     constexpr b(ts... data)         : data_{data...}     {}      int data_[5]; };  struct d : b {     using b::b; };  constexpr /*b*/ d g() { return /*b*/ d(4, 5, 6); }  int main() {     constexpr auto z = g(); } 

the error is: error c3615 constexpr function 'g' cannot result in constant expression. if construct , return b, fine.

is bug in msvc compiler?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -