gccc++11unicodeclangcodecvt

Is codecvt not supported by Clang or GCC?


I can't even get the basic codecvt example from cppreference.com to compile on GCC 4.9 or Clang 3.4, e.g.:

http://goo.gl/HZ5GLH

http://coliru.stacked-crooked.com/a/345d6d89949ac1e6


Solution

  • According to libstdc++ manual, part 22.4.1, it is missing the support for codecvt, even on the latest version.

    And libc++ has complete support for C++11 and C++14 features, so you should use it on CLang, specifying the -stdlib=libc++ compiler flag (make sure you have it installed).

    Edit: As of current versions of libstdc++, codecvt is now supported.