214 }
215+template void EnterCritical(const char*, const char*, int, Mutex*, bool);
216+template void EnterCritical(const char*, const char*, int, RecursiveMutex*, bool);
217+template void EnterCritical(const char*, const char*, int, std::mutex*, bool);
218+template void EnterCritical(const char*, const char*, int, std::recursive_mutex*, bool);
219+template void EnterCritical(const char*, const char*, int, boost::mutex*, bool);
      
        
        
        
          
          
        
        
        
          
          
            
              
            
              
no need to add dead code or code that is only used in tests
              
            
           
         
       
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
These instantiations are required even if tests do not exist. Without them it wouldn’t link with errors like:
0ld: error: undefined symbol: void EnterCritical<boost::mutex>(char const*, char const*, int, boost::mutex*, bool)
1>>> referenced by checkqueue.h:184 (src/checkqueue.h:184)
2>>>               libbitcoin_server_a-validation.o:(CCheckQueueControl<CScriptCheck>::CCheckQueueControl(CCheckQueue<CScriptCheck>*)) in archive libbitcoin_server.a
 
           
         
       
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
Yeah, this is solved in #18710 :)
EDIT: I mean boost::mutex
              
             
           
         
       
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
So when these two PRs meet and if that was the last usage of boost::mutex, then this line can be removed: template void EnterCritical(const char*, const char*, int, boost::mutex*, bool);.
              
            
           
         
       
    
        
        
        
          
          
        
        
        
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
  
Just for reference - the two PRs met in master and afterwards that line was removed in #21010.
Thanks, @fanquake!