Click here to Skip to main content
15,502,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan5-Oct-22 23:47
mveRichard MacCutchan5-Oct-22 23:47 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687716-Oct-22 5:42
Member 149687716-Oct-22 5:42 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan6-Oct-22 5:56
mveRichard MacCutchan6-Oct-22 5:56 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687717-Oct-22 9:57
Member 149687717-Oct-22 9:57 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan7-Oct-22 10:25
mveRichard MacCutchan7-Oct-22 10:25 
Questionx86 Assembly Language Pin
Member 1578377430-Sep-22 0:51
Member 1578377430-Sep-22 0:51 
AnswerRe: x86 Assembly Language Pin
Richard Deeming30-Sep-22 1:14
mveRichard Deeming30-Sep-22 1:14 
Questiontype trait is_base_of compiles here but not there Pin
BernardIE531728-Sep-22 3:33
BernardIE531728-Sep-22 3:33 
Greetings Kind Regards Each of the two uses of the type trait is_base_of compiles differently. One w/ error the other w/o. Any idea why the difference? It is documented as requiring a completed type I am not certain as to its meaning but the question remains why the difference? Thank You Kindly

The precise error message wrt the requires expression is:

1>D:\a\_work\1\s\binaries\x86ret\inc\type_traits(1152,28): error C2139: 'cDERIVED': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of'
hello_world.cpp(5): message : see declaration of 'cDERIVED'
hello_world.cpp(7): message : see reference to variable template 'const bool is_base_of_v<cbase,cderived>' being compiled
hello_world.cpp(9,2): error C7602: 'cDERIVED::someClass': the associated constraints are not satisfied
hello_world.cpp(8): message : see declaration of 'cDERIVED::someClass'
hello_world.cpp(7,32): message : the constraint was not satisfied
hello_world.cpp(9,22): error C2955: 'cDERIVED::someClass': use of class template requires template argument list
hello_world.cpp(8): message : see declaration of 'cDERIVED::someClass'
1>Done building project "hello_world.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 00:02.511 ==========


C++
import std.core;
using namespace std;

class cBASE {};
struct cDERIVED : public cBASE
{
	template<typename T> requires is_base_of_v<cBASE, cDERIVED> // will not compile
	class someClass {};
	someClass<cDERIVED> someData;
	constexpr bool TEST_is_base_of() { return is_base_of_v<cBASE, cDERIVED>; } // will compile and return true
};

int main()
{
	cout << "Hello World\n";
	cout << boolalpha;

	cDERIVED _derived;
	cout << _derived.TEST_is_base_of();
}


modified 28-Sep-22 14:14pm.

QuestionRe: type trait is_base_of compiles here but not there Pin
jeron128-Sep-22 8:11
jeron128-Sep-22 8:11 
AnswerRe: type trait is_base_of compiles here but not there Pin
BernardIE531728-Sep-22 9:15
BernardIE531728-Sep-22 9:15 
QuestionDecimal point in floating point number in CSV under European locale Pin
Shao Voon Wong26-Sep-22 19:50
mvaShao Voon Wong26-Sep-22 19:50 
AnswerRe: Decimal point in floating point number in CSV under European locale Pin
Peter_in_278026-Sep-22 20:33
professionalPeter_in_278026-Sep-22 20:33 
GeneralRe: Decimal point in floating point number in CSV under European locale Pin
Shao Voon Wong26-Sep-22 20:39
mvaShao Voon Wong26-Sep-22 20:39 
GeneralRe: Decimal point in floating point number in CSV under European locale Pin
Peter_in_278026-Sep-22 21:36
professionalPeter_in_278026-Sep-22 21:36 
Question.hex file converter Pin
Muhammad Adnan 202224-Sep-22 22:18
Muhammad Adnan 202224-Sep-22 22:18 
AnswerRe: .hex file converter Pin
Victor Nijegorodov24-Sep-22 22:34
Victor Nijegorodov24-Sep-22 22:34 
AnswerRe: .hex file converter Pin
Richard MacCutchan25-Sep-22 4:43
mveRichard MacCutchan25-Sep-22 4:43 
GeneralRe: .hex file converter Pin
Muhammad Adnan 202225-Sep-22 8:14
Muhammad Adnan 202225-Sep-22 8:14 
GeneralRe: .hex file converter Pin
Richard MacCutchan25-Sep-22 8:19
mveRichard MacCutchan25-Sep-22 8:19 
GeneralRe: .hex file converter Pin
Dave Kreskowiak25-Sep-22 11:20
mveDave Kreskowiak25-Sep-22 11:20 
QuestionRe: .hex file converter Pin
CPallini26-Sep-22 3:26
mveCPallini26-Sep-22 3:26 
Questionbasic C++ question... Pin
Member 1496877116-Sep-22 15:17
Member 1496877116-Sep-22 15:17 
AnswerRe: basic C++ question... Pin
k505417-Sep-22 5:56
mvek505417-Sep-22 5:56 
GeneralRe: basic C++ question... Pin
Member 1496877117-Sep-22 9:17
Member 1496877117-Sep-22 9:17 
AnswerRe: basic C++ question... Pin
David Crow17-Sep-22 16:44
David Crow17-Sep-22 16:44 

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.