Search:
Type: Posts; User: John E
Search:
Search took 0.06 seconds; generated 20 minute(s) ago.
-
February 21st, 2022, 07:54 AM
Thanks Victor. I tried #bits and it worked. So I then returned to # bits and that now works too!! There must've been some weird character lurking there that wasn't visible.
-
February 21st, 2022, 04:34 AM
I found this code in a header file here... it starts with a declaration of various 'DebugBit' types, followed by the declaration for a function which prints out some debug text:-
namespace DEBUG...
-
February 20th, 2022, 05:54 AM
Thanks 2kaud - that article seems to have quite a few warnings about things not behaving the way you might expect... but the bit that made me smile was this statement:- "Used as a more readable...
-
February 20th, 2022, 03:40 AM
Yesterday I came across this 'for' loop in some C++11 code:-
for (auto & trig : all_triggers) {
trig->process_state_requests (bufs, nframes - 1);
}
Is it just me - or was the older...
-
February 16th, 2022, 06:34 AM
It's okay - I solved it by calling isnan() and placing a breakpoint if the return value was non-zero.
BTW - does anyone know what the statement double *R__ mag means..? I've never come across...
-
February 16th, 2022, 05:11 AM
We all know that when setting breakpoints we can specify a condition - for example it can be specified to stop only when a value is zero. Here's some code that's causing a problem for me:-
...
-
December 4th, 2021, 09:00 AM
Ah yes, you're right - in fact even something as simple as this doesn't work...
constexpr uint32_t some_func() { return sqrt(1024); }
-
December 4th, 2021, 07:36 AM
Thanks for the tip wolle. I'd never even heard of constexpr but you're right - it works fine!
-
December 3rd, 2021, 08:56 AM
Oops - I was using square brackets instead of round :blush:
This works...
std::vector<int> buf_3(x);
-
December 3rd, 2021, 06:45 AM
uint32_t some_func() { return 32; }
int buf_1[32]; // <--- this always compiled with MSVC
int buf_2[some_func()]; // <--- whereas this fails because the buffer size needs to be known at...
-
September 29th, 2021, 05:25 AM
There are too many of them but I just realised that #pragma message is apparently supported by gcc - so hopefully I'll persuade the gcc programmers to use it instead of #warning :thumb:
-
September 29th, 2021, 04:14 AM
Wow, that looks even better - but I'd still need a way to convert #warning "whatever" into #pragma message("whatever")
-
September 29th, 2021, 03:02 AM
Thanks 2kaud but if I'm reading that article correctly, #pragma comment is for inserting a comment into the compiled file.
Over on StackOverflow someone suggested using #pragma NOTE. It doesn't...
-
September 28th, 2021, 03:35 AM
Thanks 2kaud but I think that's intended for the official (i.e. numeric) warnings. OTOH #warning is generally followed by a user-defined text message
-
September 28th, 2021, 01:47 AM
AFAICT it's not supported in MSVC but it seems to be much more common now for 3rd-party source code to contain #warning message lines. Is there any way they can be converted into something that'll...
-
September 24th, 2021, 04:55 AM
Thanks 2kaud - the 3rd link leads to a page with 2 x examples. And the 2nd example states that any function that's defined within a header file is now regarded as being implicitly inlined. But what...
-
September 24th, 2021, 03:55 AM
We all know that Visual Studio is trying to support non-Microsoft compilers. I don't know how many are supported but Clang is one of them. Consider this code:-
#if defined (BUILDING_DLL)
...
-
September 16th, 2021, 03:19 AM
Thanks 2kaud - I can see how that'd work if the exe only ever uses static libs. But if the exe links to 3 x DLL's (and it's the DLL's which each need the static lib) surely there'll be 3 x copies of...
-
September 16th, 2021, 01:53 AM
That looks promising Victor - many thanks!
-
September 16th, 2021, 01:41 AM
Consider the following code. Obviously the class is intended to get exported from a DLL - so there'll only ever be 1 x copy of some_var:-
class __declspec(dllexport) whatever
{
public:...
-
September 16th, 2021, 01:25 AM
Ah, that makes sense now I've woken up - the actual class looks like this:-
class timepos_t : public int62_t {
public:
timepos_t () : int62_t (false, 0) {}
timepos_t (TimeDomain d) :...
-
September 15th, 2021, 12:27 PM
I'm not sure if it's C++11 maybe but I just came across this line of code in a class declaration:-
explicit timepos_t (samplepos_t s) : int62_t (false, samples_to_superclock (s,...
-
September 15th, 2021, 11:09 AM
In previous versions of VS I could press F5 to start a Debug session and if the code had changed slightly it'd give me the option to rebuild or not rebuild - but VS2019 always rebuilds without giving...
-
September 6th, 2021, 12:00 PM
That looks promising 2kaud, thanks. :thumb: I'll try adapting it here for boost.
-
September 6th, 2021, 10:39 AM
I'm investigating a problem here when using boost::intrusive::list with templates but to get me started I wrote this small app (which works):-
#include <boost/intrusive/list.hpp>
#include...
|
Click Here to Expand Forum to Full Width
|