standards

Error while installing SQL Server 2012 Standard Edition

半腔热情 提交于 2019-12-06 06:00:06
Here's how the error looks while the installation: An error occurred during the setup process of the feature Attempted to perform an unauthorized operation. Clicking on Retry doesn't help, if I click on the Cancel button, it continues but then there will come up more errors like this one: NOTE: I'm not using any VM, I'm using Windows 7 Ultimate 32 bit as my OS. Here's the log details: Overall summary: Final result: Failed: see details below Exit code (Decimal): -2068119551 Start time: 2013-10-18 14:59:09 End time: 2013-10-18 16:02:02 Requested action: Install Setup completed with required

How to implement std::when_any without polling?

岁酱吖の 提交于 2019-12-06 05:35:52
Consider http://en.cppreference.com/w/cpp/experimental/when_any . The following is just a naive and simplified implementation: #include <future> template<typename Iterator> auto when_any(Iterator first, Iterator last) { while (true) { for (auto pos = first; pos != last; ++pos) { if (pos->is_ready()) { return std::move(*pos); } } } } I am not satisfied because it is a busy polling in an infinite loop. Is there a way to avoid busy polling? A polling free version would launch 1 thread per future and have them set a condition variable with which future is ready. Then you "leak" the threads until

operator new with empty exception-specification calling constructor when allocation returns 0

余生长醉 提交于 2019-12-06 05:17:40
问题 I have the following declaration: void * operator new (size_t s, PersistentMemory * m) throw() {return m->allocatePersistentMemory(s);} I'm testing memory exhaustion on start-up, which results in m->allocatePersistentMemory(s); returning 0. New then calls the constructor with a null pointer for this However, based on 3.7.3.1 paragraph 3 of C++ 2003 standard: An allocation function that fails to allocate storage can invoke the currently installed new_handler (18.4.2.2), if any. [Note: A

Why the ISO C++ standard forbids the initialization for members? [closed]

末鹿安然 提交于 2019-12-06 04:47:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Why i can't do that class A { public: int x = 10; ... }; and I have to do that ? class A { public: int x; A(){ x = 10; ... } ... }; It

Weird behaviour of prefix and postfix operators

♀尐吖头ヾ 提交于 2019-12-06 04:42:31
Why is the first expression allowed, but the second not: void test() { int a; ++a = getSomeInt(); a++ = getSomeInt(); } I mean, why its forbidden for the second one to be an lvalue ? The second one makes sense and the first not. In the first one we increment the variable and immediately after we gave here a new value, we lose it. That's not the case in the second expression. It makes sense to assign some value and increment the variable after that. The result of postfix increment is prvalue which mean pure rvalue so it is not modifiable. This is per the draft C++ standard under postfix

Which PDF of the C++ ISO standard should I read? [duplicate]

萝らか妹 提交于 2019-12-06 03:40:19
问题 This question already has answers here : Where do I find the current C or C++ standard documents? (12 answers) Closed 6 years ago . Sometimes, I want to search answers from the C++ standard by myself. Reading standards might help me get an overview of the language principle proposed. By searching the internet, I was confused by flooding C++ forums and helper websites. They provide all kinds of PDF files for reading. I don't know which PDF file and/or which version should I adopt. I found

Is there any current proposal I can follow about adding proper locale support to JavaScript?

☆樱花仙子☆ 提交于 2019-12-06 03:08:30
Even though all major operating systems and programming languages/APIs have had locale support for at least a couple of decades, it seems that JavaScript still does not! With JavaScript becoming more and more of a full application programming language both in the browser and on the server, the lack of real locale support is becoming a real problem. Are there any proposals to add locale support as it exists in other languages to the EcmaScript standard? As part of the "harmony" project or anywhere else? I'd like to support and evangelize any such proposal. (This is a followup to my previous

Which version of C++ library on Linux conform to the “ISO C++ 11” standard?

故事扮演 提交于 2019-12-06 03:04:31
问题 Presently I've Debian Squeeze(AMD64 linux), libstdc++5 and libstdc++6 on my computer. Do these C++ libraries conform to the ISO standard C++11? 回答1: No they don't conform fully, but they have elements : C++11 support on stdlibc++ (this is for the latest version, not the one you have) C++11 support on GCC versions Your best bet is to try libc++ (developed for clang but works with GCC 4.4 as well). You could try downloading and compiling the latest clang or GCC release as well. Only MS has a

shorthand typedef pointer to a constant struct

▼魔方 西西 提交于 2019-12-06 02:30:35
Declaring a struct with typedef typedef struct some_struct { int someValue; } *pSomeStruct; and then passing it as a parameter to some function with const declaration, implying 'const some_struct * var' void someFunction1( const pSomeStruct var ) turns out to become some_struct * const var This is also stated in Section 6.7.5.1 of the ISO C standard which states that 'const' in this case applies to the pointer and not to the data to which it points. So the question is - is there a way to declare a pointer to a const struct in a shorthanded notation with typedef, or there must always be a

Why are structs not allowed in equality expressions in C? [duplicate]

筅森魡賤 提交于 2019-12-06 01:18:10
问题 This question already has answers here : Why doesn't C provide struct comparison? (5 answers) Closed 2 years ago . The unavailability of structs as comparison operands is one of the more obvious things in C that don't make too much sense (to me). structs can be passed by value and copied via assignments but == is not specified for them. Below are the relevant parts of the C11 standard (draft) that define the constraints of the equality operators ( == and != ) and the simple assignment