Using a template inside a class I'm trying to use a template function, but I get an error
home/guy/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: sketch/emptyCode.ino.cpp.o: in function `startIOTservices()':
/home/guy/Documents/git/Arduino/HomePi/emptyCode/emptyCode.ino:37: undefined reference to `void myTest::funcOne&lt;bool&gt;(bool)'
/home/guy/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: sketch/emptyCode.ino.cpp.o: in function `setup':
/home/guy/Documents/git/Arduino/HomePi/emptyCode/emptyCode.ino:70: undefined reference to `void myTest::funcOne&lt;bool&gt;(bool)'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

inside .cpp file:
myTest::myTest()
{
        Serial.println(&quot;start&quot;);
}

template &lt;class T1&gt; 
void myTest::funcOne(T1 arg)
{
        Serial.println(arg);
}

inside .h file:
class myTest
{
public:
    myTest();
    template &lt;class T1&gt; 
    void funcOne(T1 arg);
};

and calling it from .ino file:
testA.funcOne(true);
What am I doing wrong ?
EDIT 1:
complete .h .cpp files - which originaly belongs to myJSON library which are deleted in this snip
#ifndef myJSON_h
#define myJSON_h

#include &quot;Arduino.h&quot;
#include &lt;ArduinoJson.h&gt;
#include &quot;FS.h&quot;

#define DOC_SIZE 1000

class myJSON
{
};

class myTest
{
public:
    myTest();
    template &lt;class T1&gt; 
    void funcOne(T1 arg);
};

#endif

.cpp file
#include &quot;Arduino.h&quot;
#include &quot;myJSON.h&quot;
#include &quot;FS.h&quot;
#include &lt;ArduinoJson.h&gt;

#define LOG_LENGTH 4

myJSON::myJSON(char *filename, bool useserial)
{
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

myTest::myTest()
{
        Serial.println(&quot;start&quot;);
}

// template &lt;typename T1&gt; 
void myTest::funcOne(T1 arg)
{
        Serial.println(arg);
}
move the template method definiton to .h or define it in class. it is not a real function, only a prescription for functions. Like this:
class myTest
{
public:
    myTest();
    template &lt;class T1&gt;
    void funcOne(T1 arg);
};

template &lt;class T1&gt;
void myTest::funcOne(T1 arg)
{
        Serial.println(arg);
}

or this
class myTest
{
public:
    myTest();
    template &lt;class T1&gt;
    void funcOne(T1 arg)
    {
            Serial.println(arg);
    }
};