![](/img/trans.png)
[英]clang_complete error: unknown argument: '--std=c++0x'
[英]clang++ C++0x std::locale
我正在嘗試構建以下應用程序; 來自http://en.cppreference.com/w/cpp/locale/messages 。
#include <iostream>
#include <locale>
int main()
{
std::locale loc("de_DE");
auto& facet = std::use_facet<std::messages<char>>(loc);
auto cat = facet.open("libstdc++", loc, "/usr/share/locale");
std::cout << "\"please\" in German: "
<< facet.get(cat, 0, 0, "please") << '\n'
<< "\"thank you\" in German: "
<< facet.get(cat, 0, 0, "thank you") << '\n';
facet.close(cat);
}
main.cpp:134:45: error: too many arguments to function call, expected 2, have 3
auto cat = facet.open("libstdc++", loc, "/usr/share/locale");
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/locale:3528:5: note: 'open' declared here
_LIBCPP_ALWAYS_INLINE
^
/usr/include/c++/v1/__config:84:32: note: instantiated from:
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
^
1 error generated.
我已經刪除了第三個打開的參數,一切都很好。 問題是我希望指定我的文本域的位置而不是默認值。 我已經查看了bindtextdomain但是也無法在我的機器上識別它。 任何提示?
環境:
此問題已在cppreference.com上解決。 見上面的評論部分。
cppreference.com上的示例現在已更新為使用標准消息:: open
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.