Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about specialization

Read more about specialization

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - specialization

Implementing template specialized functions

I'm trying to allow a class to implement an interface, where the interface is templated to either allow an update internally or not. The code looks like this and works if the implementation is within ...
test-img

Henrik

c++

class

templates

specialization

Votes: 0

Answers: 2

Latest Answer

1. Microsoft-specific syntax The syntax you're using to override GetValue() is not standard c++. class X : public IXQ<EntryType::Read> { public: float IXQ<EntryType::Read>::GetValue() ...
test-img

Turtlefight

C++ overload of swap function not working

I'm writing a custom class for which I want to use the std::swap function. As I read in this post How to overload std::swap() , I have to overload it in the same namespace of the object I'm trying to ...
test-img

linamamm

c++

template-specialization

specialization

Votes: 0

Answers: 1

Latest Answer

You have to uses std::ranges::swap, or find it via ADL if you aren't using C++20: myname::Grid<int> grid1(10, 10); myname::Grid<int> grid2(10, 10); std::ranges::swap(grid1, grid2); // Or...
test-img

Artyer

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved