Click here to Skip to main content
15,867,288 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: The Good Life Pin
Ron Nicholson10-May-21 3:52
professionalRon Nicholson10-May-21 3:52 
GeneralRe: The Good Life Pin
Richard MacCutchan10-May-21 5:12
mveRichard MacCutchan10-May-21 5:12 
GeneralWSO CCC OTD 2021-05-10 Pin
OriginalGriff9-May-21 21:27
mveOriginalGriff9-May-21 21:27 
GeneralRe: WSO CCC OTD 2021-05-10 Pin
pkfox9-May-21 21:49
professionalpkfox9-May-21 21:49 
GeneralRe: WSO CCC OTD 2021-05-10 - we have a winner! Pin
OriginalGriff9-May-21 21:53
mveOriginalGriff9-May-21 21:53 
GeneralRe: WSO CCC OTD 2021-05-10 - we have a winner! Pin
pkfox9-May-21 22:03
professionalpkfox9-May-21 22:03 
GeneralRe: WSO CCC OTD 2021-05-10 - we have a winner! Pin
OriginalGriff9-May-21 22:06
mveOriginalGriff9-May-21 22:06 
GeneralTemplate specializations are the new LISP Pin
honey the codewitch9-May-21 15:03
mvahoney the codewitch9-May-21 15:03 
If LISP stands for Lost In Silly Parentheses, then really, C++ should be renamed LISTS - lost in silly template specializations.

I've got a caps member of draw sources or targets which dictates the type of features it exposes. Then you implement methods which provide those features, so like, if you claim in your caps that your class supports "async" you are expected to provide XXXX_async() versions of your GFX draw source/destination methods.

GFX then chooses the most appropriate mechanism to complete the drawing operation you gave it based on the capabilities of the draw source and the draw target. So for example, if you have two in memory bitmaps of the same pixel format, you can basically memcpy one to the other, but if the destination is a display adapter, you may be able to transfer it via DMA, or failing that, you might be able to batch it if the destination supports it and if you can't do that you'll just have to do a standard pixel by pixel copy.

Well, this is all had through the magic of template specializations but in some cases its creating templates with more than half a dozen boolean arguments, wherein each **unique combination** of bools is a different specialization. All this because I need the compiler to prune out method calls that won't actually compile to anything and aren't valid on a target. - like XXXX_async() calls on a target that doesn't support it.

And now I'm lost, and it's time to see if I can refactor. I've got a towering combination of specializations that getting to the point where I can't follow which one is getting called, and now the results aren't what I expect (the one I want to be called isn't being called) and I can't trace why because the debuggers on these devices are crap.

This should be fun. Geez. Unsure | :~
Real programmers use butterflies

GeneralRe: Template specializations are the new LISP Pin
11917640 Member 9-May-21 18:32
11917640 Member 9-May-21 18:32 
GeneralRe: Template specializations are the new LISP Pin
honey the codewitch9-May-21 18:52
mvahoney the codewitch9-May-21 18:52 
GeneralRe: Template specializations are the new LISP Pin
Daniel Pfeffer9-May-21 21:01
professionalDaniel Pfeffer9-May-21 21:01 
GeneralRe: Template specializations are the new LISP Pin
honey the codewitch9-May-21 23:58
mvahoney the codewitch9-May-21 23:58 
GeneralRe: Template specializations are the new LISP Pin
Greg Utas10-May-21 1:24
professionalGreg Utas10-May-21 1:24 
GeneralRe: Template specializations are the new LISP Pin
honey the codewitch10-May-21 2:28
mvahoney the codewitch10-May-21 2:28 
GeneralMark Cuban "explains" why Cryptocurrency is the Future. Pin
Gerry Schmitz9-May-21 8:06
mveGerry Schmitz9-May-21 8:06 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
OriginalGriff9-May-21 8:25
mveOriginalGriff9-May-21 8:25 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Gerry Schmitz9-May-21 9:24
mveGerry Schmitz9-May-21 9:24 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
SeanChupas10-May-21 1:35
SeanChupas10-May-21 1:35 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
W Balboos, GHB10-May-21 2:50
W Balboos, GHB10-May-21 2:50 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
SeanChupas10-May-21 3:31
SeanChupas10-May-21 3:31 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Nelek10-May-21 7:02
protectorNelek10-May-21 7:02 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Greg Utas9-May-21 9:19
professionalGreg Utas9-May-21 9:19 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Gerry Schmitz9-May-21 9:25
mveGerry Schmitz9-May-21 9:25 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Greg Utas9-May-21 9:50
professionalGreg Utas9-May-21 9:50 
GeneralRe: Mark Cuban "explains" why Cryptocurrency is the Future. Pin
Gerry Schmitz9-May-21 9:58
mveGerry Schmitz9-May-21 9:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.