Public bug reported:

Hi,
I' running Ubuntu 14.04.3 LTS and have the package g++4:4.8.2-1ubuntu6  
installed.

When trying to compile the following snippet I get an internal compiler
error.

---

#include <string>
#include <iostream>

template <typename ... Args>
std::string build_string(std::string fmt, std::initializer_list<Args...> args) {
    for (const auto& arg : args) {
        // use arg to build string
    }

    return "foo";
}  


int main() {
    build_string("%.2f and %s", {3.14, "Hello"} );
}

---

The compiler flags were:
g++ -o bla --std=c++11 bla.cxx 


The obtained error message is:

bla.cxx: In function ‘int main()’:
bla.cxx:17:49: internal compiler error: in unify, at cp/pt.c:17258
     build_string("%.2f and %s", {3.14, "Hello"} );
                                                 ^
Please submit a full bug report.

** Affects: gcc-4.8 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1482601

Title:
  g++-4.8.4, Ubuntu 14.04, internal compiler error: in unify, at cp/pt.c

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1482601/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to