Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
16 Feb 17 04:39
Wee Loong Kuan
xxxxxx@gmail.com
Join Date: 15 Feb 2017
Posts To This List: 2
C++ type_traits in kernel mode

Hi all, As an experiment, I'm writing a toy KMDF driver in C++. I understand that there's no STL in kernel mode, so I've been rolling my own type_traits-like classes. However, I'm hitting a brick wall when it comes to traits requiring compiler support, like is_final or is_union. Would anyone know if there are plans for any sort of type_traits support in the WDK, or if I can use the MSVC's trait intrinsics (E.g. __is_final()) in kernel mode? (I suspect doing the latter is probably UB, but one can hope...) Thanks and best!
  Message 2 of 3  
16 Feb 17 10:46
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10004
C++ type_traits in kernel mode

I would start with the intrinsics. If they don't require rrti you should be fine. And from the looks of them, they don't generate code outside of true/false so I don't see a km compatibility issue unless there are other dependencies Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@gmail.com> Sent: Thursday, February 16, 2017 1:38:44 AM To: Windows System Software Devs Interest List Subject: [ntdev] C++ type_traits in kernel mode Hi all, As an experiment, I'm writing a toy KMDF driver in C++. I understand that there's no STL in kernel mode, so I've been rolling my own type_traits-like classes. However, I'm hitting a brick wall when it comes to traits requiring compiler support, like is_final or is_union. Would anyone know if there are plans for any sort of type_traits support in the WDK, or if I can use the MSVC's trait intrinsics (E.g. __is_final()) in kernel mode? (I suspect doing the latter is probably UB, but one can hope...) Thanks and best! --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 3 of 3  
17 Feb 17 10:29
Wee Loong Kuan
xxxxxx@gmail.com
Join Date: 15 Feb 2017
Posts To This List: 2
C++ type_traits in kernel mode

That's great to hear - thanks Doron!
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 15:45.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license