First  |  Prev |  Next  |  Last
Pages: 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
linktime error for function overloads in template class when library is a dynamic library
I have a weird linktime problem that I hope people can shed some light on. This is for some code I am working on. I didn't write it. The linktime problem only happens when the library is built as a DLL. It might help when I say what the hacky workaround is that I used. There is a class that is like std::cout,... 18 Mar 2010 18:55
Microsoft chooses to leave C++ compiler broken
<http://connect.microsoft.com/VisualStudio/feedback/details/336316/missing-destructor-calls-when-optimization-is-enabled> This was brought to my attention by someone with whom I occasionally correspond about C++. (He can reply to identify himself if he wishes.) Two years after having an error in Visual C++ repo... 25 Mar 2010 02:08
o.k. to use boolean expression as array index?
Hello, is this correct C++ code? enum E { e1, e2 }; int func(E e) { int arr[]={3,4}; return arr[e==e1]; } I have an optimized Visual C++ 8 build where arr is accessed with some large value, neither 0 nor 1. I am wondering whether this is a compiler bug. TIA, Arno -- [ See http://... 22 Mar 2010 01:27
The noexcept keyword, deprecated exception specifications and compilers
Now that exception specifications are going to be deprecated and throw() is going to be replaced with noexcept, presumably for the various dtors in the std library, I wonder what is going to happen when it comes to compiler warnings and errors. At the moment I get exception-related compile time errors from GCC fo... 17 Mar 2010 12:27
VS 2005 compiler died on this recursive template
{ edits: 22 excess spaces in the commented code line removed. The question of this article is in the subject line "VS 2005 compiler died on this recursive template". -mod } template <int i> struct Factorial { enum { N = i<=0? 1 : i*Factorial<i-1>::N }; }; //template<> struct Factorial<0> { ... 16 Mar 2010 06:50
Am I or Alexandrescu wrong about singletons?
Hi, I try to implement a simplified version of Alexandrescu's Loki::SingletonHolder. See http://loki-lib.sourceforge.net/html/a00670.html row 717. My code looks like this. template<typename T> class Singleton { public: static T& getInstance() { return *instance_; } private: ... 4 May 2010 21:17
display integer in MessageBox
{ Please avoid compiler- and OS-specific issues in follow-ups. Thanks. -mod } Hello, I need to display int value in MessageBox in my dll that is created using MS C++ . Unfortunatedly I'm new in C++ and I don't know variable types like LPCWSTR and how to convert it from int. int i =10; MessageBox(NULL,TEXT(... 16 Mar 2010 06:50
tuple in variadic template class constructor initialization list
In the class "Foo" below, is it possible to use a constructor initialization list to initialize "cs", a tuple of complex values? // #include <iostream>,<tuple>,<complex>,<type_traits> template <typename T, typename ... Ts> struct Foo { std::tuple<std::complex<T>, std::complex<Ts>...> cs; template<type... 31 Mar 2010 17:41
I keep running into long term c++ programmers who refuse to use exception
daniel_t(a)earthlink.net (Daniel T.) wrote (abridged): So we have two different scenarios on the table: A) The program tries to open a file that is necessary for correct function. This file is provided with the program and put in the correct place during program installation. B) The program tries to o... 14 Mar 2010 22:04
I keep running into long term c++ programmers who refuse to use exceptions
Daniel T. wrote: Seungbeom Kim <musiphil(a)bawi.org> wrote: Daniel T. wrote: (....) You seem to have a very narrow understanding of what can/should be done in exception handlers. You almost seem to argue (or you may actually be arguing), "Writing exception handlers means the exceptions are expecte... 17 Mar 2010 23:23
First  |  Prev |  Next  |  Last
Pages: 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44